Skip to content
Permalink
Browse files
Update to latest wptrunner
  • Loading branch information
jgraham committed Mar 31, 2016
1 parent 3c00aff commit 06da441
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
@@ -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,
@@ -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}
@@ -76,6 +76,7 @@ def do_test(self, test):
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
@@ -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,
@@ -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

0 comments on commit 06da441

Please sign in to comment.