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
--- 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