Bug 1529052 [wpt PR 15422] - Do not throw from taskcluster-run.py if wpt fails, a=testonly
authorRobert Ma <robertma@chromium.org>
Tue, 05 Mar 2019 12:17:45 +0000
changeset 522469 c6d92a71240c37ee9715183bc35fa756c2091a82
parent 522468 8b570896ed6855a3dd1aaa00f3038971a8e3e58d
child 522470 49b20d703832f84944761ca959f005e50fc90011
push id10871
push usercbrindusan@mozilla.com
push dateMon, 18 Mar 2019 15:49:32 +0000
treeherdermozilla-beta@018abdd16060 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1529052, 15422
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1529052 [wpt PR 15422] - Do not throw from taskcluster-run.py if wpt fails, a=testonly Automatic update from web-platform-tests Do not throw from taskcluster-run.py if wpt fails Previously when `wpt run` stability check fails, the wrapper script taskcluster-run.py would throw an uncaught exception, which might be confused with an infra error. This change makes taskcluster-run.py return a non-zero exit code without printing the traceback. -- wpt-commits: 322981aed92da3b8fa13eb53f25acb8d3a9cb467 wpt-pr: 15422
testing/web-platform/tests/tools/ci/taskcluster-run.py
--- a/testing/web-platform/tests/tools/ci/taskcluster-run.py
+++ b/testing/web-platform/tests/tools/ci/taskcluster-run.py
@@ -1,16 +1,17 @@
 #!/usr/bin/env python
 
 import argparse
 import gzip
 import logging
 import os
 import shutil
 import subprocess
+import sys
 
 browser_specific_args = {
     "firefox": ["--install-browser"]
 }
 
 
 def find_wptreport(args):
     parser = argparse.ArgumentParser()
@@ -33,18 +34,17 @@ def main(product, commit_range, wpt_args
     logger = logging.getLogger("tc-run")
     logger.setLevel(logging.INFO)
     handler = logging.StreamHandler()
     handler.setFormatter(
         logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
     )
     logger.addHandler(handler)
 
-    child = subprocess.Popen(['python', './wpt', 'manifest-download'])
-    child.wait()
+    subprocess.call(['python', './wpt', 'manifest-download'])
 
     if commit_range:
         logger.info(
             "Running tests affected in range '%s'..." % commit_range
         )
         wpt_args += ['--affected', commit_range]
     else:
         logger.info("Running all tests")
@@ -60,17 +60,19 @@ def main(product, commit_range, wpt_args
         "--verify-log-full"
     ]
     wpt_args += browser_specific_args.get(product, [])
 
     command = ["python", "./wpt", "run"] + wpt_args + [product]
 
     logger.info("Executing command: %s" % " ".join(command))
 
-    subprocess.check_call(command)
+    retcode = subprocess.call(command)
+    if retcode != 0:
+        sys.exit(retcode)
 
     wptreport = find_wptreport(wpt_args)
     if wptreport:
         gzip_file(wptreport)
 
 
 if __name__ == "__main__":
     parser = argparse.ArgumentParser(description=main.__doc__)