[V1] framework/dts: capture exception generated in finnaly sentence
Commit Message
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(-)
Comments
Tested-by: Haiyang Zhao <haiyangx.zhao@intel.com>
Best Regards,
Zhao Haiyang
> -----Original Message-----
> From: Haiyang Zhao <haiyangx.zhao@intel.com>
> Sent: Tuesday, November 17, 2020 17:15
> To: Tu, Lijuan <lijuan.tu@intel.com>; dts@dpdk.org
> Cc: Zhao, HaiyangX <haiyangx.zhao@intel.com>
> Subject: [dts][PATCH V1] framework/dts: capture exception generated in
> finnaly sentence
> 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>
Applied
@@ -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,