Bug 1485403 - Handle ManifestVersionMismatch when loading the test manifest, a=testonly
--- 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