servo: Merge #20312 - Avoid using WPT test runner to update the test manifest (from jdm:fix-manifest-update); r=asajeffrey
authorJosh Matthews <>
Fri, 16 Mar 2018 16:16:23 -0400
changeset 408643 a91bff97f39d7a1c74e9d5d8de88775d4d34a70a
parent 408642 4d434313555ab39636c97c528ff80481b5c0df39
child 408644 958b3aa1565a6b39d83e966b02e6f5f003727f48
push id100996
push dateSat, 17 Mar 2018 10:37:43 +0000
treeherdermozilla-inbound@97160a734959 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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
servo: Merge #20312 - Avoid using WPT test runner to update the test manifest (from jdm:fix-manifest-update); r=asajeffrey Our old code to update the test manifest relied on running no actual tests. This is now broken by, so these changes duplicate Firefox's implementation to reduce risk of future breakage. This will allow automated WPT syncing to resume. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] There are tests for these changes Source-Repo: Source-Revision: 74d6a91ee55c3bc803cec8c57f9b56e677bd8b97
--- a/servo/etc/ci/
+++ b/servo/etc/ci/
@@ -3,25 +3,9 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at
 set -o errexit
 set -o nounset
 set -o pipefail
-echo "About to update manifest."
-# We shouldn't need any binary at all to update the manifests.
-# Adding "SKIP_TESTS" to skip tests, it doesn't really skip the tests.
-# It will run "run_wpt" with "'test_list': ['SKIP_TESTS']",
-# and then pass it into wptrunner, which won't be able to find any tests named
-# "SKIP_TESTS", and thus won't run any.
-# Adding "--binary=" to skip looking for a compiled servo binary.
-./mach test-wpt --manifest-update --binary= SKIP_TESTS
-echo "Updated manifest; about to check if any changes were made to it."
-echo "If a diff is present, please run './mach update-manifest' \
-and commit the change."
-diff="$(git diff -- tests/*/MANIFEST.json)"
-echo "${diff}"
-[[ -z "${diff}" ]]
+./mach update-manifest --check-clean
--- a/servo/python/servo/
+++ b/servo/python/servo/
@@ -72,16 +72,29 @@ def create_parser_wpt():
                         help="Run under chaos mode in rr until a failure is captured")
     parser.add_argument('--pref', default=[], action="append", dest="prefs",
                         help="Pass preferences to servo")
     parser.add_argument('--always-succeed', default=False, action="store_true",
                         help="Always yield exit code of zero")
     return parser
+def create_parser_manifest_update():
+    import manifestupdate
+    return manifestupdate.create_parser()
+def run_update(topdir, check_clean=False, rebuild=False, **kwargs):
+    import manifestupdate
+    from wptrunner import wptlogging
+    logger = wptlogging.setup(kwargs, {"mach": sys.stdout})
+    wpt_dir = os.path.abspath(os.path.join(topdir, 'tests', 'wpt'))
+    manifestupdate.update(logger, wpt_dir, check_clean, rebuild)
 class MachCommands(CommandBase):
     HELP_RENDER_MODE = "Value can be 'cpu', 'gpu' or 'both' (default " + DEFAULT_RENDER_MODE + ")"
     def __init__(self, context):
         CommandBase.__init__(self, context)
         if not hasattr(self.context, "built_tests"):
@@ -424,21 +437,19 @@ class MachCommands(CommandBase):
         run_globals = {"__file__": run_file}
         execfile(run_file, run_globals)
         return run_globals["run_tests"](**kwargs)
              description='Run test-wpt --manifest-update SKIP_TESTS to regenerate MANIFEST.json',
-             parser=create_parser_wpt)
+             parser=create_parser_manifest_update)
     def update_manifest(self, **kwargs):
-        kwargs['test_list'].append(str('SKIP_TESTS'))
-        kwargs['manifest_update'] = True
-        return self.test_wpt(**kwargs)
+        return run_update(self.context.topdir, **kwargs)
              description='Update the web platform tests',
     def update_wpt(self, **kwargs):
         run_file = path.abspath(path.join("tests", "wpt", ""))