summaryrefslogtreecommitdiff
path: root/deps/v8/tools/testrunner/testproc
diff options
context:
space:
mode:
authorRefael Ackermann <refack@gmail.com>2019-03-27 10:32:10 -0400
committerMichaël Zasso <targos@protonmail.com>2019-11-08 15:46:43 +0100
commitc587bb7ddf7559c8c3d6a44d1c2bfadd9634402f (patch)
treeacba6755e94b9de9a687ed09e35b4f521023010c /deps/v8/tools/testrunner/testproc
parentb55557bc437154cf2e84b6c8dccece9467d9a922 (diff)
downloadandroid-node-v8-c587bb7ddf7559c8c3d6a44d1c2bfadd9634402f.tar.gz
android-node-v8-c587bb7ddf7559c8c3d6a44d1c2bfadd9634402f.tar.bz2
android-node-v8-c587bb7ddf7559c8c3d6a44d1c2bfadd9634402f.zip
deps: V8: un-cherry-pick bd019bd
Original commit message: [testrunner] delete ancient junit compatible format support Testrunner has ancient support for JUnit compatible XML output. This CL removes this old feature. R=mstarzinger@chromium.org,jgruber@chromium.org,jkummerow@chromium.org CC=​machenbach@chromium.org Bug: v8:8728 Change-Id: I7e1beb011dbaec3aa1a27398a5c52abdd778eaf0 Reviewed-on: https://chromium-review.googlesource.com/c/1430065 Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Commit-Queue: Tamer Tas <tmrts@chromium.org> Cr-Commit-Position: refs/heads/master@{#59045} Refs: https://github.com/v8/v8/commit/bd019bdb725cebaa34327634d73936cd7003d17c PR-URL: https://github.com/nodejs/node/pull/26685 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Diffstat (limited to 'deps/v8/tools/testrunner/testproc')
-rw-r--r--deps/v8/tools/testrunner/testproc/progress.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/deps/v8/tools/testrunner/testproc/progress.py b/deps/v8/tools/testrunner/testproc/progress.py
index 98f08ac842..3bb9744f1e 100644
--- a/deps/v8/tools/testrunner/testproc/progress.py
+++ b/deps/v8/tools/testrunner/testproc/progress.py
@@ -14,6 +14,7 @@ import sys
import time
from . import base
+from ..local import junit_output
# Base dir of the build products for Release and Debug.
@@ -316,6 +317,45 @@ class MonochromeProgressIndicator(CompactProgressIndicator):
print(("\r" + (" " * last_length) + "\r"), end='')
+class JUnitTestProgressIndicator(ProgressIndicator):
+ def __init__(self, junitout, junittestsuite):
+ super(JUnitTestProgressIndicator, self).__init__()
+ self._requirement = base.DROP_PASS_STDOUT
+
+ self.outputter = junit_output.JUnitTestOutput(junittestsuite)
+ if junitout:
+ self.outfile = open(junitout, "w")
+ else:
+ self.outfile = sys.stdout
+
+ def _on_result_for(self, test, result):
+ # TODO(majeski): Support for dummy/grouped results
+ fail_text = ""
+ output = result.output
+ if result.has_unexpected_output:
+ stdout = output.stdout.strip()
+ if len(stdout):
+ fail_text += "stdout:\n%s\n" % stdout
+ stderr = output.stderr.strip()
+ if len(stderr):
+ fail_text += "stderr:\n%s\n" % stderr
+ fail_text += "Command: %s" % result.cmd.to_string()
+ if output.HasCrashed():
+ fail_text += "exit code: %d\n--- CRASHED ---" % output.exit_code
+ if output.HasTimedOut():
+ fail_text += "--- TIMEOUT ---"
+ self.outputter.HasRunTest(
+ test_name=str(test),
+ test_cmd=result.cmd.to_string(relative=True),
+ test_duration=output.duration,
+ test_failure=fail_text)
+
+ def finished(self):
+ self.outputter.FinishAndWrite(self.outfile)
+ if self.outfile != sys.stdout:
+ self.outfile.close()
+
+
class JsonTestProgressIndicator(ProgressIndicator):
def __init__(self, framework_name, json_test_results, arch, mode):
super(JsonTestProgressIndicator, self).__init__()