Skip to content

Commit

Permalink
Make check_stability.py use the --verify code
Browse files Browse the repository at this point in the history
Note this doesn't yet address web-platform-tests#9874, as it currently only runs the
repeat_restart mode of --verify (as it did previously).
  • Loading branch information
gsnedders committed May 28, 2018
1 parent 2a4943b commit 0f0baf4
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions tools/ci/check_stability.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from tools import localpaths

logger = None
stability_run, write_inconsistent, write_results = None, None, None
run_step, write_inconsistent, write_results = None, None, None
wptrunner = None

def setup_logging():
Expand All @@ -35,10 +35,9 @@ def setup_logging():


def do_delayed_imports():
global stability_run, write_inconsistent, write_results, wptrunner
from tools.wpt.stability import run as stability_run
from tools.wpt.stability import write_inconsistent, write_results
global wptrunner, run_step, write_inconsistent, write_results
from wptrunner import wptrunner
from wptrunner.stability import run_step, write_inconsistent, write_results


class TravisFold(object):
Expand Down Expand Up @@ -266,11 +265,15 @@ def run(venv, wpt_args, **kwargs):

do_delayed_imports()

wpt_kwargs["stability"] = True
wpt_kwargs["prompt"] = False
wpt_kwargs["install_browser"] = True
wpt_kwargs["install"] = wpt_kwargs["product"].split(":")[0] == "firefox"

wpt_kwargs["pause_after_test"] = False
wpt_kwargs["verify_log_full"] = True
if wpt_kwargs["repeat"] == 1:
wpt_kwargs["repeat"] = 10

wpt_kwargs = setup_wptrunner(venv, **wpt_kwargs)

logger.info("Using binary %s" % wpt_kwargs["binary"])
Expand All @@ -279,9 +282,8 @@ def run(venv, wpt_args, **kwargs):
with TravisFold("running_tests"):
logger.info("Starting tests")


wpt_logger = wptrunner.logger
iterations, results, inconsistent = stability_run(venv, wpt_logger, **wpt_kwargs)
results, inconsistent, iterations = run_step(wpt_logger, wpt_kwargs["repeat"], True, {}, **wpt_kwargs)

if results:
if inconsistent:
Expand Down

0 comments on commit 0f0baf4

Please sign in to comment.