[dts] [PATCH V1] framework/dts: Regist generate ASan report action to atexit

Jun Dong junx.dong at intel.com
Sat Apr 2 10:54:54 CEST 2022


Sometime, the framework does not generate ASan reports when exiting abnormally, 
because the operation of generating reports is at the end of the main flow of 
the framework, and there are no guarantee measures in case of abnormality. So
register the generate operation with the atexit module.

Signed-off-by: Jun Dong <junx.dong at intel.com>
---
 framework/dts.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/framework/dts.py b/framework/dts.py
index 1ffb1c23..dbb5a1ed 100644
--- a/framework/dts.py
+++ b/framework/dts.py
@@ -559,6 +559,8 @@ def run_all(
 
     # prepare ASan test
     ASanTestProcess.test_prepare(asan, output_dir)
+    # register generate ASan report action
+    atexit.register(ASanTestProcess.test_process)
 
     if not os.path.exists(output_dir):
         os.mkdir(output_dir)
@@ -676,9 +678,6 @@ def run_all(
 
     save_all_results()
 
-    # process ASan test report
-    ASanTestProcess.test_process()
-
 
 def show_speedup_options_messages(read_cache, skip_setup):
     if read_cache:
-- 
2.33.1.windows.1



More information about the dts mailing list