From dd698f8d8398ec97dcb1eb8c9900b3160828aa27 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Thu, 4 Feb 2021 20:28:54 +0800 Subject: [PATCH] logging the crash properly when running test262-harness.py (#4472) 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 781bdc9da..f53d4dcb6 100755 --- a/tools/runners/test262-harness.py +++ b/tools/runners/test262-harness.py @@ -434,6 +434,12 @@ class TestResult(object): 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))