mirror of
https://github.com/servo/servo.git
synced 2025-08-16 02:45:36 +01:00
Update web-platform-tests to revision 2abaf21d855986de7baa55ad52a601c489ff22fd
This commit is contained in:
parent
e09e683718
commit
05d9213a6e
33 changed files with 531 additions and 95 deletions
|
@ -510,11 +510,9 @@ def setup_wptrunner(venv, prompt=True, install_browser=False, **kwargs):
|
|||
files_changed, manifest_path=kwargs.get("manifest_path"), manifest_update=kwargs["manifest_update"])
|
||||
test_list = tests_changed | tests_affected
|
||||
logger.info("Identified %s affected tests" % len(test_list))
|
||||
if not test_list and not kwargs["test_list"]:
|
||||
logger.info("Quitting because no tests were affected.")
|
||||
exit()
|
||||
test_list = [os.path.relpath(item, wpt_root) for item in test_list]
|
||||
kwargs["test_list"] += test_list
|
||||
kwargs["default_exclude"] = True
|
||||
|
||||
if install_browser and not kwargs["channel"]:
|
||||
logger.info("--install-browser is given but --channel is not set, default to nightly channel")
|
||||
|
|
|
@ -338,15 +338,17 @@ class EqualTimeChunker(TestChunker):
|
|||
|
||||
|
||||
class TestFilter(object):
|
||||
def __init__(self, test_manifests, include=None, exclude=None, manifest_path=None):
|
||||
if manifest_path is not None and include is None:
|
||||
self.manifest = manifestinclude.get_manifest(manifest_path)
|
||||
else:
|
||||
def __init__(self, test_manifests, include=None, exclude=None, manifest_path=None, explicit=False):
|
||||
if manifest_path is None or include or explicit:
|
||||
self.manifest = manifestinclude.IncludeManifest.create()
|
||||
self.manifest.set_defaults()
|
||||
else:
|
||||
self.manifest = manifestinclude.get_manifest(manifest_path)
|
||||
|
||||
if include or explicit:
|
||||
self.manifest.set("skip", "true")
|
||||
|
||||
if include:
|
||||
self.manifest.set("skip", "true")
|
||||
for item in include:
|
||||
self.manifest.add_include(test_manifests, item)
|
||||
|
||||
|
|
|
@ -137,6 +137,11 @@ scheme host and port.""")
|
|||
test_selection_group.add_argument("--tag", action="append", dest="tags",
|
||||
help="Labels applied to tests to include in the run. "
|
||||
"Labels starting dir: are equivalent to top-level directories.")
|
||||
test_selection_group.add_argument("--default-exclude", action="store_true",
|
||||
default=False,
|
||||
help="Only run the tests explicitly given in arguments. "
|
||||
"No tests will run if the list is empty, and the "
|
||||
"program will exit with status code 0.")
|
||||
|
||||
debugging_group = parser.add_argument_group("Debugging")
|
||||
debugging_group.add_argument('--debugger', const="__default__", nargs="?",
|
||||
|
|
|
@ -59,11 +59,12 @@ def get_loader(test_paths, product, debug=None, run_info_extras=None, **kwargs):
|
|||
manifest_filters = []
|
||||
meta_filters = []
|
||||
|
||||
if kwargs["include"] or kwargs["exclude"] or kwargs["include_manifest"]:
|
||||
if kwargs["include"] or kwargs["exclude"] or kwargs["include_manifest"] or kwargs["default_exclude"]:
|
||||
manifest_filters.append(testloader.TestFilter(include=kwargs["include"],
|
||||
exclude=kwargs["exclude"],
|
||||
manifest_path=kwargs["include_manifest"],
|
||||
test_manifests=test_manifests))
|
||||
test_manifests=test_manifests,
|
||||
explicit=kwargs["default_exclude"]))
|
||||
if kwargs["tags"]:
|
||||
meta_filters.append(testloader.TagFilter(tags=kwargs["tags"]))
|
||||
|
||||
|
@ -169,7 +170,7 @@ def run_tests(config, test_paths, product, **kwargs):
|
|||
test_total = 0
|
||||
unexpected_total = 0
|
||||
|
||||
if len(test_loader.test_ids) == 0:
|
||||
if len(test_loader.test_ids) == 0 and kwargs["test_list"]:
|
||||
logger.error("Unable to find any tests at the path(s):")
|
||||
for path in kwargs["test_list"]:
|
||||
logger.error(" %s" % path)
|
||||
|
@ -299,8 +300,12 @@ def run_tests(config, test_paths, product, **kwargs):
|
|||
if skipped_tests > 0:
|
||||
logger.warning("All requested tests were skipped")
|
||||
else:
|
||||
logger.error("No tests ran")
|
||||
return False
|
||||
if kwargs["default_exclude"]:
|
||||
logger.info("No tests ran")
|
||||
return True
|
||||
else:
|
||||
logger.error("No tests ran")
|
||||
return False
|
||||
|
||||
if unexpected_total and not kwargs["fail_on_unexpected"]:
|
||||
logger.info("Tolerating %s unexpected results" % unexpected_total)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue