From 5bd6a57c8d485a618190c7a4baffba8b2fd1c270 Mon Sep 17 00:00:00 2001 From: Edoardo Zoni Date: Thu, 8 Aug 2024 11:34:23 -0700 Subject: [PATCH] Check test run, analysis, and comparison --- regtest.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/regtest.py b/regtest.py index a5acf26..b1a629b 100755 --- a/regtest.py +++ b/regtest.py @@ -1225,15 +1225,12 @@ def test_suite(argv): #---------------------------------------------------------------------- # if test ran and passed, remove test directory if requested #---------------------------------------------------------------------- - if (test.ignore_return_code == 1 or test.return_code == 0): + test_successful = (test.return_code == 0 and test.analysis_successful and test.compare_successful) + if (test.ignore_return_code == 1 or test_successful): if args.rm_testdir: - suite.log.log("removing subdirectories in test directory...") + suite.log.log("removing subdirectories from test directory...") for file_name in os.listdir(output_dir): file_path = os.path.join(output_dir, file_name) - #if os.path.isfile(file_path) or os.path.islink(file_path): - # os.unlink(file_path) - #elif os.path.isdir(file_path): - # shutil.rmtree(file_path) if os.path.isdir(file_path): shutil.rmtree(file_path) # switch to the full test directory