Bug 1305795 - Produce a test manifest entry for web-platform; r?ted draft
authorGregory Szorc <gps@mozilla.com>
Tue, 27 Sep 2016 15:46:19 -0700
changeset 418566 1c5c05478c07b4494d520166c1473593b572f0ad
parent 418565 bf8c6e6818bdebf666cf231252f73906397abc1b
child 532370 4255eaf817d314aae30138071740842e8918764d
push id30707
push userbmo:gps@mozilla.com
push dateWed, 28 Sep 2016 18:02:51 +0000
reviewersted
bugs1305795
milestone52.0a1
Bug 1305795 - Produce a test manifest entry for web-platform; r?ted This change makes the WPT mozharness script only download the bin.tests.zip file (instead of the default which is to download common.tests.zip and bin.tests.zip). With this change, the WPT jobs in automation only download the package archive, the bin.tests.zip file. Everything else is referenced from a source checkout! MozReview-Commit-ID: 7tLqHFDjltO
build/gen_test_packages_manifest.py
--- a/build/gen_test_packages_manifest.py
+++ b/build/gen_test_packages_manifest.py
@@ -28,16 +28,21 @@ PACKAGE_SPECIFIED_HARNESSES = [
     'talos',
 ]
 
 # These packages are not present for every build configuration.
 OPTIONAL_PACKAGES = [
     'gtest',
 ]
 
+# Maps harness name to set of package names.
+EXPLICIT_HARNESSES = {
+    'web-platform': {'bin'}
+}
+
 
 def parse_args():
     parser = ArgumentParser(description='Generate a test_packages.json file to tell automation which harnesses require which test packages.')
     parser.add_argument("--common", required=True,
                         action="store", dest="tests_common",
                         help="Name of the \"common\" archive, a package to be used by all harnesses.")
     parser.add_argument("--jsshell", required=True,
                         action="store", dest="jsshell",
@@ -65,16 +70,22 @@ def generate_package_data(args):
     # harness depends on to run.
     # 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, args.bin]) for k in ALL_HARNESSES])
+
+    for harness, packages in EXPLICIT_HARNESSES.items():
+        if harness in harness_requirements:
+            raise Exception('key from EXPLICIT_HARNESSES already exists: %s' % harness)
+        harness_requirements[harness] = [getattr(args, package) for package in packages]
+
     harness_requirements['jittest'].append(jsshell)
     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