mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update web-platform-tests to revision 3a8328470d53c4501e31cec2775c4d33821c2275
This commit is contained in:
parent
f92f0809f8
commit
40c0b971f1
32 changed files with 530 additions and 238 deletions
|
@ -22,7 +22,7 @@ from tools.wpt import markdown
|
|||
from tools import localpaths
|
||||
|
||||
logger = None
|
||||
run, write_inconsistent, write_results = None, None, None
|
||||
stability_run, write_inconsistent, write_results = None, None, None
|
||||
wptrunner = None
|
||||
|
||||
def setup_logging():
|
||||
|
@ -37,8 +37,9 @@ def setup_logging():
|
|||
|
||||
|
||||
def do_delayed_imports():
|
||||
global run, write_inconsistent, write_results, wptrunner
|
||||
from tools.wpt.stability import run, write_inconsistent, write_results
|
||||
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
|
||||
from wptrunner import wptrunner
|
||||
|
||||
|
||||
|
@ -254,12 +255,9 @@ def main():
|
|||
|
||||
|
||||
def run(venv, wpt_args, **kwargs):
|
||||
global logger
|
||||
|
||||
do_delayed_imports()
|
||||
|
||||
retcode = 0
|
||||
parser = get_parser()
|
||||
|
||||
wpt_args = create_parser().parse_args(wpt_args)
|
||||
|
||||
|
@ -335,7 +333,7 @@ def run(venv, wpt_args, **kwargs):
|
|||
|
||||
|
||||
wpt_logger = wptrunner.logger
|
||||
iterations, results, inconsistent = run(venv, wpt_logger, **wpt_kwargs)
|
||||
iterations, results, inconsistent = stability_run(venv, wpt_logger, **wpt_kwargs)
|
||||
|
||||
if results:
|
||||
if inconsistent:
|
||||
|
@ -353,16 +351,17 @@ def run(venv, wpt_args, **kwargs):
|
|||
status="failed" if inconsistent else "passed")
|
||||
else:
|
||||
logger.info("No tests run.")
|
||||
# Be conservative and only return errors when we know for sure tests are changed.
|
||||
if tests_changed:
|
||||
retcode = 3
|
||||
|
||||
return retcode
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
retcode = main()
|
||||
sys.exit(main())
|
||||
except Exception:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
sys.exit(1)
|
||||
else:
|
||||
sys.exit(retcode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue