Bug 1632601: Create test archives for jsreftest and jittest r=ahal
authorChris AtLee <catlee@mozilla.com>
Fri, 24 Apr 2020 20:18:58 +0000
changeset 526005 434df61a71b040feaaae94f0f278fc73bdf2f031
parent 526004 f74cfdb2275ef2546b35cad4ad716d38093d56d2
child 526006 07408b255fec822237603653302cc0ac9bcda159
push id37348
push userrmaries@mozilla.com
push dateSat, 25 Apr 2020 09:49:23 +0000
treeherdermozilla-central@d8a8178627c4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1632601
milestone77.0a1
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
Bug 1632601: Create test archives for jsreftest and jittest r=ahal Split out jsreftest and jittest files into their own packages, removing them from the common package. This speeds up extracting files from the common test archive for non-jsreftest/jittest suites. Also, remove some files from the web-platform test archive that are already present in the common archive. Differential Revision: https://phabricator.services.mozilla.com/D72192
build/gen_test_packages_manifest.py
python/mozbuild/mozbuild/action/test_archive.py
testing/mozharness/mozharness/mozilla/testing/testbase.py
testing/testsuite-targets.mk
--- a/build/gen_test_packages_manifest.py
+++ b/build/gen_test_packages_manifest.py
@@ -17,30 +17,33 @@ ALL_HARNESSES = [
     'cppunittest',
     'jittest',
     'mozbase',
     'web-platform',
     'talos',
     'raptor',
     'awsy',
     'gtest',
-    'updater-dep'
+    'updater-dep',
+    'jsreftest',
 ]
 
 PACKAGE_SPECIFIED_HARNESSES = [
     'condprof',
     'cppunittest',
     'mochitest',
     'reftest',
     'xpcshell',
     'web-platform',
     'talos',
     'raptor',
     'awsy',
     'updater-dep',
+    'jittest',
+    'jsreftest',
 ]
 
 # These packages are not present for every build configuration.
 OPTIONAL_PACKAGES = [
     'gtest',
 ]
 
 
@@ -76,16 +79,17 @@ def generate_package_data(args):
     # mozharness will use this file to determine what test zips to download,
     # which will be an optimization once parts of the main zip are split to harness
     # specific zips.
     tests_common = args.tests_common
     jsshell = args.jsshell
 
     harness_requirements = dict([(k, [tests_common]) for k in ALL_HARNESSES])
     harness_requirements['jittest'].append(jsshell)
+    harness_requirements['jsreftest'].append(args.reftest)
     for harness in PACKAGE_SPECIFIED_HARNESSES + OPTIONAL_PACKAGES:
         pkg_name = getattr(args, harness, None)
         if pkg_name is None:
             continue
         harness_requirements[harness].append(pkg_name)
     return harness_requirements
 
 
--- a/python/mozbuild/mozbuild/action/test_archive.py
+++ b/python/mozbuild/mozbuild/action/test_archive.py
@@ -108,16 +108,19 @@ ARCHIVE_FILES = {
                 'mochitest/**',
                 'reftest/**',
                 'talos/**',
                 'raptor/**',
                 'awsy/**',
                 'web-platform/**',
                 'xpcshell/**',
                 'updater-dep/**',
+                'jsreftest/**',
+                'jit-test/**',
+                'jittest/**',  # To make the ignore checker happy
             ],
         },
         {
             'source': buildconfig.topobjdir,
             'base': '_tests',
             'pattern': 'modules/**',
         },
         {
@@ -167,52 +170,16 @@ ARCHIVE_FILES = {
         {
             'source': buildconfig.topsrcdir,
             'base': 'toolkit/components/telemetry/tests/marionette',
             'pattern': '/**',
             'dest': 'telemetry/marionette',
         },
         {
             'source': buildconfig.topsrcdir,
-            'base': 'js/src',
-            'pattern': 'jit-test/**',
-            'dest': 'jit-test',
-        },
-        {
-            'source': buildconfig.topsrcdir,
-            'base': 'js/src/tests',
-            'pattern': 'non262/shell.js',
-            'dest': 'jit-test/tests',
-        },
-        {
-            'source': buildconfig.topsrcdir,
-            'base': 'js/src/tests',
-            'pattern': 'non262/Math/shell.js',
-            'dest': 'jit-test/tests',
-        },
-        {
-            'source': buildconfig.topsrcdir,
-            'base': 'js/src/tests',
-            'pattern': 'non262/reflect-parse/Match.js',
-            'dest': 'jit-test/tests',
-        },
-        {
-            'source': buildconfig.topsrcdir,
-            'base': 'js/src/tests',
-            'pattern': 'lib/**',
-            'dest': 'jit-test/tests',
-        },
-        {
-            'source': buildconfig.topsrcdir,
-            'base': 'js/src',
-            'pattern': 'jsapi.h',
-            'dest': 'jit-test',
-        },
-        {
-            'source': buildconfig.topsrcdir,
             'base': 'testing',
             'pattern': 'tps/**',
         },
         {
             'source': buildconfig.topsrcdir,
             'base': 'services/sync/',
             'pattern': 'tps/**',
         },
@@ -571,16 +538,20 @@ ARCHIVE_FILES = {
             'source': buildconfig.topsrcdir,
             'base': 'testing',
             'pattern': 'web-platform/mozilla/**',
         },
         {
             'source': buildconfig.topsrcdir,
             'base': 'testing',
             'pattern': 'web-platform/tests/**',
+            'ignore': [
+                'web-platform/tests/tools/wptserve',
+                'web-platform/tests/tools/wpt_third_party',
+            ],
         },
         {
             'source': buildconfig.topobjdir,
             'base': '_tests',
             'pattern': 'web-platform/**',
         },
         {
             'source': buildconfig.topobjdir,
@@ -653,16 +624,61 @@ ARCHIVE_FILES = {
         # Required by the updater on Linux
         {
             'source': buildconfig.topobjdir,
             'base': 'config/external/sqlite',
             'pattern': 'libmozsqlite3.so',
             'dest': 'updater-dep',
         },
     ],
+    'jsreftest': [
+        {
+            'source': STAGE,
+            'base': '',
+            'pattern': 'jsreftest/**',
+        },
+    ],
+    'jittest': [
+        {
+            'source': buildconfig.topsrcdir,
+            'base': 'js/src',
+            'pattern': 'jit-test/**',
+            'dest': 'jit-test',
+        },
+        {
+            'source': buildconfig.topsrcdir,
+            'base': 'js/src/tests',
+            'pattern': 'non262/shell.js',
+            'dest': 'jit-test/tests',
+        },
+        {
+            'source': buildconfig.topsrcdir,
+            'base': 'js/src/tests',
+            'pattern': 'non262/Math/shell.js',
+            'dest': 'jit-test/tests',
+        },
+        {
+            'source': buildconfig.topsrcdir,
+            'base': 'js/src/tests',
+            'pattern': 'non262/reflect-parse/Match.js',
+            'dest': 'jit-test/tests',
+        },
+        {
+            'source': buildconfig.topsrcdir,
+            'base': 'js/src/tests',
+            'pattern': 'lib/**',
+            'dest': 'jit-test/tests',
+        },
+        {
+            'source': buildconfig.topsrcdir,
+            'base': 'js/src',
+            'pattern': 'jsapi.h',
+            'dest': 'jit-test',
+        },
+    ]
 }
 
 if buildconfig.substs.get('MOZ_CODE_COVERAGE'):
     ARCHIVE_FILES['common'].append({
         'source': buildconfig.topsrcdir,
         'base': 'python/mozbuild/',
         'patterns': [
             'mozpack/**',
--- a/testing/mozharness/mozharness/mozilla/testing/testbase.py
+++ b/testing/mozharness/mozharness/mozilla/testing/testbase.py
@@ -316,31 +316,40 @@ You can set this by specifying --test-ur
             'mochitest-webgl1-ext': 'mochitest',
             'mochitest-webgl2-core': 'mochitest',
             'mochitest-webgl2-ext': 'mochitest',
             'mochitest-webgl2-deqp': 'mochitest',
             'mochitest-webgpu': 'mochitest',
             'geckoview': 'mochitest',
             'geckoview-junit': 'mochitest',
             'reftest-qr': 'reftest',
-            'jsreftest': 'reftest',
             'crashtest': 'reftest',
             'reftest-debug': 'reftest',
-            'jsreftest-debug': 'reftest',
             'crashtest-debug': 'reftest',
         }
         suite_categories = [aliases.get(name, name) for name in suite_categories]
 
         dirs = self.query_abs_dirs()
         test_install_dir = dirs.get('abs_test_install_dir',
                                     os.path.join(dirs['abs_work_dir'], 'tests'))
         self.mkdir_p(test_install_dir)
         package_requirements = self._read_packages_manifest()
         target_packages = []
+        c = self.config
         for category in suite_categories:
+            specified_suites = c.get("specified_{}_suites".format(category))
+            if specified_suites:
+                found = False
+                for specified_suite in specified_suites:
+                    if specified_suite in package_requirements:
+                        target_packages.extend(package_requirements[specified_suite])
+                        found = True
+                if found:
+                    continue
+
             if category in package_requirements:
                 target_packages.extend(package_requirements[category])
             else:
                 # If we don't harness specific requirements, assume the common zip
                 # has everything we need to run tests for this suite.
                 target_packages.extend(package_requirements['common'])
 
         # eliminate duplicates -- no need to download anything twice
@@ -362,16 +371,20 @@ You can set this by specifying --test-ur
                                   .format(req_file))
                         unpack_dirs.append(req_file)
 
             if "jsshell-" in file_name or file_name == "target.jsshell.zip":
                 self.info("Special-casing the jsshell zip file")
                 unpack_dirs = None
                 target_dir = dirs['abs_test_bin_dir']
 
+            if "web-platform" in file_name:
+                self.info("Extracting everything from web-platform archive")
+                unpack_dirs = None
+
             url = self.query_build_dir_url(file_name)
             self.download_unpack(url, target_dir,
                                  extract_dirs=unpack_dirs)
 
     def _download_test_zip(self, extract_dirs=None):
         dirs = self.query_abs_dirs()
         test_install_dir = dirs.get('abs_test_install_dir',
                                     os.path.join(dirs['abs_work_dir'], 'tests'))
--- a/testing/testsuite-targets.mk
+++ b/testing/testsuite-targets.mk
@@ -119,16 +119,18 @@ TEST_PKGS_TARGZ := \
   mochitest \
   reftest \
   talos \
   raptor \
   awsy \
   xpcshell \
   web-platform \
   updater-dep \
+  jsreftest \
+  jittest \
   $(NULL)
 
 ifdef LINK_GTEST_DURING_COMPILE
 stage-all: stage-gtest
 TEST_PKGS_TARGZ += gtest
 endif
 
 PKG_ARG = --$(1) '$(PKG_BASENAME).$(1).tests.$(2)'