Backed out changeset 9778c00980aa (bug 1330421) for failing to fetch websocketprocessbridge_requirements.txt, at least for Android reftests. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Mon, 30 Jan 2017 20:26:25 +0100
changeset 331680 d434f525133357141b5c5d87fb5433f6d871a6dc
parent 331679 baf39ca711ce6394bf5d0c5029ba1ed48f058bb3
child 331681 38ae38323406aa8cb53603e4e2f35b9a0c5d18ac
push id36654
push userarchaeopteryx@coole-files.de
push dateMon, 30 Jan 2017 19:26:39 +0000
treeherderautoland@d434f5251333 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1330421
milestone54.0a1
backs out9778c00980aa18fb37e6f0e3cb2387cdccad43fc
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 9778c00980aa (bug 1330421) for failing to fetch websocketprocessbridge_requirements.txt, at least for Android reftests. r=backout
python/mozbuild/mozbuild/action/test_archive.py
--- a/python/mozbuild/mozbuild/action/test_archive.py
+++ b/python/mozbuild/mozbuild/action/test_archive.py
@@ -15,19 +15,17 @@ import itertools
 import os
 import sys
 import time
 
 from manifestparser import TestManifest
 from reftest import ReftestManifest
 
 from mozbuild.util import ensureParentDir
-from mozpack.copier import FileRegistry
-from mozpack.files import ExistingFile, FileFinder
-from mozpack.manifests import InstallManifest
+from mozpack.files import FileFinder
 from mozpack.mozjar import JarWriter
 import mozpack.path as mozpath
 
 import buildconfig
 
 STAGE = mozpath.join(buildconfig.topobjdir, 'dist', 'test-stage')
 
 TEST_HARNESS_BINS = [
@@ -69,32 +67,16 @@ TEST_PLUGIN_DIRS = [
 ]
 
 GMP_TEST_PLUGIN_DIRS = [
     'gmp-clearkey/**',
     'gmp-fake/**',
     'gmp-fakeopenh264/**',
 ]
 
-# These entries will be used by artifact builds to re-construct an
-# objdir with the appropriate generated support files.
-OBJDIR_TEST_FILES = {
-    'xpcshell': {
-        'source': buildconfig.topobjdir,
-        'base': '_tests/xpcshell',
-        'pattern': '**',
-        'dest': 'xpcshell/tests',
-    },
-    'mochitest': {
-        'source': buildconfig.topobjdir,
-        'base': '_tests/testing',
-        'pattern': 'mochitest/**',
-    },
-}
-
 
 ARCHIVE_FILES = {
     'common': [
         {
             'source': STAGE,
             'base': '',
             'pattern': '**',
             'ignore': [
@@ -315,17 +297,16 @@ ARCHIVE_FILES = {
     'gtest': [
         {
             'source': STAGE,
             'base': '',
             'pattern': 'gtest/**',
         },
     ],
     'mochitest': [
-        OBJDIR_TEST_FILES['mochitest'],
         {
             'source': buildconfig.topobjdir,
             'base': '_tests/testing',
             'pattern': 'mochitest/**',
         },
         {
             'source': STAGE,
             'base': '',
@@ -398,17 +379,22 @@ ARCHIVE_FILES = {
         {
             'source': buildconfig.topobjdir,
             'base': '',
             'pattern': 'mozinfo.json',
             'dest': 'web-platform',
         },
     ],
     'xpcshell': [
-        OBJDIR_TEST_FILES['xpcshell'],
+        {
+            'source': buildconfig.topobjdir,
+            'base': '_tests/xpcshell',
+            'pattern': '**',
+            'dest': 'xpcshell/tests',
+        },
         {
             'source': buildconfig.topsrcdir,
             'base': 'testing/xpcshell',
             'patterns': [
                 'head.js',
                 'mach_test_package_commands.py',
                 'moz-http2/**',
                 'moz-spdy/**',
@@ -452,61 +438,18 @@ for k, v in ARCHIVE_FILES.items():
 
     ignores = set(itertools.chain(*(e.get('ignore', [])
                                   for e in ARCHIVE_FILES['common'])))
 
     if not any(p.startswith('%s/' % k) for p in ignores):
         raise Exception('"common" ignore list probably should contain %s' % k)
 
 
-def find_generated_harness_files():
-    # TEST_HARNESS_FILES end up in an install manifest at
-    # $topsrcdir/_build_manifests/install/_tests.
-    manifest = InstallManifest(mozpath.join(buildconfig.topobjdir,
-                                            '_build_manifests',
-                                            'install',
-                                            '_tests'))
-    registry = FileRegistry()
-    manifest.populate_registry(registry)
-    # Conveniently, the generated files we care about will already
-    # exist in the objdir, so we can identify relevant files if
-    # they're an `ExistingFile` instance.
-    return [mozpath.join('_tests', p) for p in registry.paths()
-            if isinstance(registry[p], ExistingFile)]
-
-
 def find_files(archive):
-    extra_entries = []
-    generated_harness_files = find_generated_harness_files()
-
-    if archive == 'common':
-        # Construct entries ensuring all our generated harness files are
-        # packaged in the common tests zip.
-        packaged_paths = set()
-        for entry in OBJDIR_TEST_FILES.values():
-            pat = mozpath.join(entry['base'], entry['pattern'])
-            del entry['pattern']
-            patterns = []
-            for path in generated_harness_files:
-                if mozpath.match(path, pat):
-                    patterns.append(path[len(entry['base']) + 1:])
-                    packaged_paths.add(path)
-            if patterns:
-                entry['patterns'] = patterns
-                extra_entries.append(entry)
-        entry = {
-            'source': buildconfig.topobjdir,
-            'base': '_tests',
-            'patterns': [],
-        }
-        for path in set(generated_harness_files) - packaged_paths:
-            entry['patterns'].append(path[len('_tests') + 1:])
-        extra_entries.append(entry)
-
-    for entry in ARCHIVE_FILES[archive] + extra_entries:
+    for entry in ARCHIVE_FILES[archive]:
         source = entry['source']
         dest = entry.get('dest')
         base = entry.get('base', '')
 
         pattern = entry.get('pattern')
         patterns = entry.get('patterns', [])
         if pattern:
             patterns.append(pattern)
@@ -521,22 +464,16 @@ def find_files(archive):
 
         ignore = list(entry.get('ignore', []))
         ignore.extend([
             '**/.flake8',
             '**/.mkdir.done',
             '**/*.pyc',
         ])
 
-        if archive != 'common' and base.startswith('_tests'):
-            # We may have generated_harness_files to exclude from this entry.
-            for path in generated_harness_files:
-                if path.startswith(base):
-                    ignore.append(path[len(base) + 1:])
-
         common_kwargs = {
             'find_executables': False,
             'find_dotfiles': True,
             'ignore': ignore,
         }
 
         finder = FileFinder(os.path.join(source, base), **common_kwargs)