Return correct exit codes.

This commit is contained in:
James Graham 2015-04-03 23:27:29 +01:00
parent e31744e48e
commit db104b738e

View file

@ -25,7 +25,8 @@ def run_tests(paths=None, **kwargs):
paths = {}
set_defaults(paths, kwargs)
wptrunner.setup_logging(kwargs, {"mach": sys.stdout})
return wptrunner.run_tests(**kwargs)
success = wptrunner.run_tests(**kwargs)
return 0 if success else 1
def set_defaults(paths, kwargs):
if kwargs["product"] is None:
@ -52,4 +53,3 @@ def main(paths=None):
parser = wptcommandline.create_parser()
kwargs = vars(parser.parse_args())
return run_tests(paths, **kwargs)