Bug 1391589 - Show time taken by test in jstests and jit-test log. r=jandem
authorTooru Fujisawa <arai_a@mac.com>
Sat, 26 Aug 2017 07:27:13 +0900
changeset 426584 4a2057c45500abae96f1c880cbcbc494414e1eb8
parent 426583 22b96cee9f15d9aa64651756762f001f2e9486a2
child 426585 fe5d86b3b80a45da7e6e5d31da7ca53889de9239
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1391589
milestone57.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 1391589 - Show time taken by test in jstests and jit-test log. r=jandem
js/src/tests/lib/jittests.py
js/src/tests/lib/results.py
--- a/js/src/tests/lib/jittests.py
+++ b/js/src/tests/lib/jittests.py
@@ -476,18 +476,18 @@ def print_automation_format(ok, res):
     # INFO stdout          > foo
     # INFO stdout          > bar
     # INFO stdout          > baz
     # INFO stderr         2> TypeError: or something
     # TEST-UNEXPECTED-FAIL | jit_test.py: Test execution interrupted by user
     result = "TEST-PASS" if ok else "TEST-UNEXPECTED-FAIL"
     message = "Success" if ok else res.describe_failure()
     jitflags = " ".join(res.test.jitflags)
-    print("{} | {} | {} (code {}, args \"{}\")".format(
-        result, res.test.relpath_top, message, res.rc, jitflags))
+    print("{} | {} | {} (code {}, args \"{}\") [{:.1f} s]".format(
+        result, res.test.relpath_top, message, res.rc, jitflags, res.dt))
 
     # For failed tests, print as much information as we have, to aid debugging.
     if ok:
         return
     print("INFO exit-status     : {}".format(res.rc))
     print("INFO timed-out       : {}".format(res.timed_out))
     for line in res.out.splitlines():
         print("INFO stdout          > " + line.strip())
--- a/js/src/tests/lib/results.py
+++ b/js/src/tests/lib/results.py
@@ -295,9 +295,10 @@ class ResultsSink:
         args += test.jitflags
         result += ' | (args: "{}")'.format(' '.join(args))
         if message:
             result += " | " + message
         if skip:
             result += ' | (SKIP)'
         if time > self.options.timeout:
             result += ' | (TIMEOUT)'
+        result += ' [{:.1f} s]'.format(time)
         print(result)