test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] framework/dts: capture exception generated in finnaly sentence
@ 2020-11-17  9:15 Haiyang Zhao
  2020-11-18  3:17 ` Zhao, HaiyangX
  2020-11-18  3:39 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: Haiyang Zhao @ 2020-11-17  9:15 UTC (permalink / raw)
  To: lijuan.tu, dts; +Cc: Haiyang Zhao

if exception raised in execute_tear_downall,
the result will not be saved and DTS will be terminated,
capture the exception to fix it.

Signed-off-by: Haiyang Zhao <haiyangx.zhao@intel.com>
---
 framework/dts.py | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/framework/dts.py b/framework/dts.py
index 8a3790e..8c61385 100644
--- a/framework/dts.py
+++ b/framework/dts.py
@@ -486,8 +486,16 @@ def dts_run_suite(duts, tester, test_suites, target, subtitle):
             settings.report_error("GENERIC_ERR")
             log_handler.error(str(e))
         finally:
-            suite_obj.execute_tear_downall()
-            save_all_results()
+            try:
+                suite_obj.execute_tear_downall()
+            except Exception as e:
+                settings.report_error("GENERIC_ERR")
+                log_handler.error(str(e))
+            try:
+                save_all_results()
+            except Exception as e:
+                settings.report_error("GENERIC_ERR")
+                log_handler.error(str(e))
 
 
 def run_all(config_file, pkgName, git, patch, skip_setup,
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-18  3:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-17  9:15 [dts] [PATCH V1] framework/dts: capture exception generated in finnaly sentence Haiyang Zhao
2020-11-18  3:17 ` Zhao, HaiyangX
2020-11-18  3:39 ` Tu, Lijuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).