Bug 1479672 - Report which test failed, and suppress the spew on saying subprocess.CalledProcessError with a messy stack
authorSteve Fink <sfink@mozilla.com>
Tue, 17 Jul 2018 11:34:17 -0700
changeset 441530 8308ccadecfad676d2316242014a30d118b9b17d
parent 441529 5dc260a940fb4c7e4804ae08de3fa853d8b46c2b
child 441531 1c5c021b7271da663ed9631de95a842ac83fede1
push id34867
push usershindli@mozilla.com
push dateWed, 17 Oct 2018 00:55:53 +0000
treeherdermozilla-central@778427bb6353 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1479672
milestone64.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 1479672 - Report which test failed, and suppress the spew on saying subprocess.CalledProcessError with a messy stack
js/src/devtools/rootAnalysis/run-test.py
--- a/js/src/devtools/rootAnalysis/run-test.py
+++ b/js/src/devtools/rootAnalysis/run-test.py
@@ -87,10 +87,17 @@ for name in cfg.tests:
 
     os.chdir(outdir)
     subprocess.call(["sh", "-c", "rm *.xdb"])
     if cfg.verbose:
         print("Running test %s" % name)
     testpath = os.path.join(indir, "test.py")
     testscript = open(testpath).read()
     testcode = compile(testscript, testpath, 'exec')
-    exec(testcode, {'test': test, 'equal': equal})
-    print("TEST-PASSED: %s" % name)
+    try:
+        exec(testcode, {'test': test, 'equal': equal})
+    except subprocess.CalledProcessError:
+        print("TEST-FAILED: %s" % name)
+    except StandardError:
+        print("TEST-FAILED: %s" % name)
+        raise
+    else:
+        print("TEST-PASSED: %s" % name)