mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Cherry-pick https://github.com/web-platform-tests/wpt/pull/15949 from upstream.
This commit is contained in:
parent
17e04fb255
commit
3a46bf651a
1 changed files with 8 additions and 5 deletions
|
@ -421,11 +421,11 @@ def load(tests_root, manifest, types=None, meta_filters=None):
|
||||||
__load_cache = {}
|
__load_cache = {}
|
||||||
|
|
||||||
|
|
||||||
def _load(logger, tests_root, manifest, types=None, meta_filters=None):
|
def _load(logger, tests_root, manifest, types=None, meta_filters=None, allow_cached=True):
|
||||||
# "manifest" is a path or file-like object.
|
# "manifest" is a path or file-like object.
|
||||||
manifest_path = (manifest if isinstance(manifest, string_types)
|
manifest_path = (manifest if isinstance(manifest, string_types)
|
||||||
else manifest.name)
|
else manifest.name)
|
||||||
if manifest_path in __load_cache:
|
if allow_cached and manifest_path in __load_cache:
|
||||||
return __load_cache[manifest_path]
|
return __load_cache[manifest_path]
|
||||||
|
|
||||||
if isinstance(manifest, string_types):
|
if isinstance(manifest, string_types):
|
||||||
|
@ -450,7 +450,8 @@ def _load(logger, tests_root, manifest, types=None, meta_filters=None):
|
||||||
types=types,
|
types=types,
|
||||||
meta_filters=meta_filters)
|
meta_filters=meta_filters)
|
||||||
|
|
||||||
__load_cache[manifest_path] = rv
|
if allow_cached:
|
||||||
|
__load_cache[manifest_path] = rv
|
||||||
return rv
|
return rv
|
||||||
|
|
||||||
|
|
||||||
|
@ -464,7 +465,8 @@ def load_and_update(tests_root,
|
||||||
working_copy=False,
|
working_copy=False,
|
||||||
types=None,
|
types=None,
|
||||||
meta_filters=None,
|
meta_filters=None,
|
||||||
write_manifest=True):
|
write_manifest=True,
|
||||||
|
allow_cached=True):
|
||||||
logger = get_logger()
|
logger = get_logger()
|
||||||
|
|
||||||
manifest = None
|
manifest = None
|
||||||
|
@ -474,7 +476,8 @@ def load_and_update(tests_root,
|
||||||
tests_root,
|
tests_root,
|
||||||
manifest_path,
|
manifest_path,
|
||||||
types=types,
|
types=types,
|
||||||
meta_filters=meta_filters)
|
meta_filters=meta_filters,
|
||||||
|
allow_cached=allow_cached)
|
||||||
except ManifestVersionMismatch:
|
except ManifestVersionMismatch:
|
||||||
logger.info("Manifest version changed, rebuilding")
|
logger.info("Manifest version changed, rebuilding")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue