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 14, 2018
1 parent 68f7ff0 commit a035acf
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 @@ -22,7 +22,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 @@ -37,10 +37,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 @@ -318,11 +317,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 @@ -331,9 +334,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 a035acf

Please sign in to comment.