From 091681faecea2f46dd47574270b869ae39ce53ee Mon Sep 17 00:00:00 2001 From: He Yin Ling Date: Thu, 20 May 2021 14:32:18 +0800 Subject: [PATCH] ttfw: fix DUT exception not added to junit report --- tools/ci/python_packages/tiny_test_fw/TinyFW.py | 2 +- tools/ci/python_packages/ttfw_idf/IDFDUT.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/ci/python_packages/tiny_test_fw/TinyFW.py b/tools/ci/python_packages/tiny_test_fw/TinyFW.py index 6e2d03d38e..da72d3b5c3 100644 --- a/tools/ci/python_packages/tiny_test_fw/TinyFW.py +++ b/tools/ci/python_packages/tiny_test_fw/TinyFW.py @@ -210,7 +210,7 @@ def test_method(**kwargs): # and raise exception in DUT close to fail test case if reset detected. if close_errors: for error in close_errors: - junit_test_case.add_failure_info(str(error)) + junit_test_case.add_failure_info('env close error: {}'.format(error)) result = False if not case_info["junit_report_by_case"]: JunitReport.test_case_finish(junit_test_case) diff --git a/tools/ci/python_packages/ttfw_idf/IDFDUT.py b/tools/ci/python_packages/ttfw_idf/IDFDUT.py index 9f64cbea9d..9c4223ddce 100644 --- a/tools/ci/python_packages/ttfw_idf/IDFDUT.py +++ b/tools/ci/python_packages/ttfw_idf/IDFDUT.py @@ -387,5 +387,4 @@ class IDFDUT(DUT.SerialDUT): def close(self): super(IDFDUT, self).close() if not self.allow_dut_exception and self.get_exceptions(): - Utility.console_log("DUT exception detected on {}".format(self), color="red") - raise IDFDUTException() + raise IDFDUTException('DUT exception detected on {}'.format(self))