Bug 1485403 - Handle ManifestVersionMismatch when loading the test manifest, a=testonly
authormoz-wptsync-bot <wptsync@mozilla.com>
Wed, 22 Aug 2018 16:11:57 +0000
changeset 831127 4f8e3acdef35337054c23776fcb78ce518927fc3
parent 831126 0712c83df132cba1b7075faebafa37eeeb315bd8
child 831128 fe72a77d866db978bddf7f008d5bd2863613bb02
push id118868
push userbmo:zjz@zjz.name
push dateFri, 24 Aug 2018 07:04:39 +0000
reviewerstestonly
bugs1485403
milestone63.0a1
Bug 1485403 - Handle ManifestVersionMismatch when loading the test manifest, a=testonly
testing/web-platform/tests/tools/wptrunner/wptrunner/testloader.py
--- a/testing/web-platform/tests/tools/wptrunner/wptrunner/testloader.py
+++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/testloader.py
@@ -434,17 +434,20 @@ class ManifestLoader(object):
         manifest_update.update(tests_path, manifest_file, True)
 
         manifest.write(manifest_file, manifest_path)
 
     def load_manifest(self, tests_path, manifest_path, url_base="/", **kwargs):
         if (not os.path.exists(manifest_path) or
             self.force_manifest_update):
             self.update_manifest(manifest_path, tests_path, url_base, download=self.manifest_download)
-        manifest_file = manifest.load(tests_path, manifest_path, types=self.types, meta_filters=self.meta_filters)
+        try:
+            manifest_file = manifest.load(tests_path, manifest_path, types=self.types, meta_filters=self.meta_filters)
+        except manifest.ManifestVersionMismatch:
+            manifest_file = manifest.Manifest(url_base)
         if manifest_file.url_base != url_base:
             self.logger.info("Updating url_base in manifest from %s to %s" % (manifest_file.url_base,
                                                                               url_base))
             manifest_file.url_base = url_base
             manifest.write(manifest_file, manifest_path)
 
         return manifest_file