From c7b16fb7a87893a9bca92f8661a0c72a5b991685 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Mon, 18 Jan 2021 15:50:23 -0800 Subject: [PATCH] logging the crash properly when running test262-harness.py When running tests262 cases, the jerry program may exit with error code other than 1, that's means a crash or JERRY_ASSERT triggered and should be resolved, so dump the test name and stderr/stdout for tracking those crash in CI. related issue: #4463 JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com --- tools/runners/test262-harness.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/runners/test262-harness.py b/tools/runners/test262-harness.py index a5ce19a677..f834c46a78 100755 --- a/tools/runners/test262-harness.py +++ b/tools/runners/test262-harness.py @@ -434,6 +434,12 @@ def __init__(self, exit_code, stdout, stderr, case): def report_outcome(self, long_format): name = self.case.get_name() mode = self.case.get_mode() + + if self.exit_code != 0 and self.exit_code != 1: + sys.stderr.write(u"===%s failed in %s with negative:%s===\n" + % (name, mode, self.case.get_negative_type())) + self.write_output(sys.stderr) + if self.has_unexpected_outcome(): if self.case.is_negative(): print("=== %s passed in %s, but was expected to fail ===" % (name, mode))