test suite reviews and discussions
 help / color / mirror / Atom feed
From: Haiyang Zhao <haiyangx.zhao@intel.com>
To: lijuan.tu@intel.com, dts@dpdk.org
Cc: Haiyang Zhao <haiyangx.zhao@intel.com>
Subject: [dts] [PATCH V1] framework/dts: capture exception generated in finnaly sentence
Date: Tue, 17 Nov 2020 17:15:10 +0800	[thread overview]
Message-ID: <20201117091510.7932-1-haiyangx.zhao@intel.com> (raw)

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


             reply	other threads:[~2020-11-17  9:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17  9:15 Haiyang Zhao [this message]
2020-11-18  3:17 ` Zhao, HaiyangX
2020-11-18  3:39 ` Tu, Lijuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201117091510.7932-1-haiyangx.zhao@intel.com \
    --to=haiyangx.zhao@intel.com \
    --cc=dts@dpdk.org \
    --cc=lijuan.tu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).