diff options
author | James Graham <james@hoppipolla.co.uk> | 2016-03-31 18:06:17 +0100 |
---|---|---|
committer | James Graham <james@hoppipolla.co.uk> | 2016-03-31 18:29:28 +0100 |
commit | 06da4412f6194a22fb6100b923331a65c5613db5 (patch) | |
tree | 23a6b95ea6e891048df549e5c5efc87093a18118 | |
parent | 3c00aff5468e8ac1bc88b9fc01aa6091f9552d95 (diff) | |
download | servo-06da4412f6194a22fb6100b923331a65c5613db5.tar.gz servo-06da4412f6194a22fb6100b923331a65c5613db5.zip |
Update to latest wptrunner
-rw-r--r-- | tests/wpt/harness/wptrunner/browsers/firefox.py | 5 | ||||
-rw-r--r-- | tests/wpt/harness/wptrunner/browsers/servo.py | 7 | ||||
-rw-r--r-- | tests/wpt/harness/wptrunner/executors/executorservo.py | 1 | ||||
-rw-r--r-- | tests/wpt/harness/wptrunner/wptcommandline.py | 3 | ||||
-rw-r--r-- | tests/wpt/harness/wptrunner/wptrunner.py | 15 |
5 files changed, 22 insertions, 9 deletions
diff --git a/tests/wpt/harness/wptrunner/browsers/firefox.py b/tests/wpt/harness/wptrunner/browsers/firefox.py index e0ac5833118..92d70764903 100644 --- a/tests/wpt/harness/wptrunner/browsers/firefox.py +++ b/tests/wpt/harness/wptrunner/browsers/firefox.py @@ -56,11 +56,11 @@ def executor_kwargs(test_type, server_config, cache_manager, run_info_data, executor_kwargs["close_after_done"] = True if kwargs["timeout_multiplier"] is None: if test_type == "reftest": - if run_info_data["debug"]: + if run_info_data["debug"] or run_info_data.get("asan"): executor_kwargs["timeout_multiplier"] = 4 else: executor_kwargs["timeout_multiplier"] = 2 - elif run_info_data["debug"]: + elif run_info_data["debug"] or run_info_data.get("asan"): executor_kwargs["timeout_multiplier"] = 3 return executor_kwargs @@ -82,6 +82,7 @@ def update_properties(): class FirefoxBrowser(Browser): used_ports = set() + init_timeout = 60 def __init__(self, logger, binary, prefs_root, debug_info=None, symbols_path=None, stackwalk_binary=None, certutil_binary=None, diff --git a/tests/wpt/harness/wptrunner/browsers/servo.py b/tests/wpt/harness/wptrunner/browsers/servo.py index 42300e2b453..bc90cefcfc9 100644 --- a/tests/wpt/harness/wptrunner/browsers/servo.py +++ b/tests/wpt/harness/wptrunner/browsers/servo.py @@ -29,6 +29,7 @@ def check_args(**kwargs): def browser_kwargs(**kwargs): return {"binary": kwargs["binary"], "debug_info": kwargs["debug_info"], + "binary_args": kwargs["binary_args"], "user_stylesheets": kwargs.get("user_stylesheets"), "render_backend": kwargs.get("servo_backend")} @@ -62,16 +63,18 @@ def render_arg(render_backend): class ServoBrowser(NullBrowser): - def __init__(self, logger, binary, debug_info=None, user_stylesheets=None, - render_backend="cpu"): + def __init__(self, logger, binary, debug_info=None, binary_args=None, + user_stylesheets=None, render_backend="cpu"): NullBrowser.__init__(self, logger) self.binary = binary self.debug_info = debug_info + self.binary_args = binary_args or [] self.user_stylesheets = user_stylesheets or [] self.render_backend = render_backend def executor_browser(self): return ExecutorBrowser, {"binary": self.binary, "debug_info": self.debug_info, + "binary_args": self.binary_args, "user_stylesheets": self.user_stylesheets, "render_backend": self.render_backend} diff --git a/tests/wpt/harness/wptrunner/executors/executorservo.py b/tests/wpt/harness/wptrunner/executors/executorservo.py index 61ecbf06dab..b3421ffe625 100644 --- a/tests/wpt/harness/wptrunner/executors/executorservo.py +++ b/tests/wpt/harness/wptrunner/executors/executorservo.py @@ -76,6 +76,7 @@ class ServoTestharnessExecutor(ProcessTestExecutor): args += ["--user-stylesheet", stylesheet] for pref, value in test.environment.get('prefs', {}).iteritems(): args += ["--pref", "%s=%s" % (pref, value)] + args += self.browser.binary_args debug_args, command = browser_command(self.binary, args, self.debug_info) self.command = command diff --git a/tests/wpt/harness/wptrunner/wptcommandline.py b/tests/wpt/harness/wptrunner/wptcommandline.py index 5b110094e5c..9979d69fd38 100644 --- a/tests/wpt/harness/wptrunner/wptcommandline.py +++ b/tests/wpt/harness/wptrunner/wptcommandline.py @@ -58,6 +58,9 @@ def create_parser(product_choices=None): parser.add_argument("--binary", action="store", type=abs_path, help="Binary to run tests against") + parser.add_argument('--binary-arg', + default=[], action="append", dest="binary_args", + help="Extra argument for the binary (servo)") parser.add_argument("--webdriver-binary", action="store", metavar="BINARY", type=abs_path, help="WebDriver server binary to use") parser.add_argument("--processes", action="store", type=int, default=None, diff --git a/tests/wpt/harness/wptrunner/wptrunner.py b/tests/wpt/harness/wptrunner/wptrunner.py index 65b02cc2431..47560c83a35 100644 --- a/tests/wpt/harness/wptrunner/wptrunner.py +++ b/tests/wpt/harness/wptrunner/wptrunner.py @@ -102,6 +102,8 @@ def list_disabled(test_paths, product, **kwargs): def get_pause_after_test(test_loader, **kwargs): total_tests = sum(len(item) for item in test_loader.tests.itervalues()) if kwargs["pause_after_test"] is None: + if kwargs["repeat_until_unexpected"]: + return False if kwargs["repeat"] == 1 and total_tests == 1: return True return False @@ -222,9 +224,9 @@ def run_tests(config, test_paths, product, **kwargs): def main(): """Main entry point when calling from the command line""" - try: - kwargs = wptcommandline.parse_args() + kwargs = wptcommandline.parse_args() + try: if kwargs["prefs_root"] is None: kwargs["prefs_root"] = os.path.abspath(os.path.join(here, "prefs")) @@ -237,6 +239,9 @@ def main(): else: return not run_tests(**kwargs) except Exception: - import pdb, traceback - print traceback.format_exc() - pdb.post_mortem() + if kwargs["pdb"]: + import pdb, traceback + print traceback.format_exc() + pdb.post_mortem() + else: + raise |