Skip to content

Commit 3387dbd

Browse files
committed
add option to delete executable if test passes
1 parent 4789924 commit 3387dbd

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

regtest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,6 +1235,10 @@ def test_suite(argv):
12351235
shutil.rmtree(file_path)
12361236
# switch to the full test directory
12371237
os.chdir(suite.full_test_dir)
1238+
if args.delete_exe:
1239+
suite.log.log("removing executable from test directory...")
1240+
os.remove(executable)
1241+
12381242

12391243
#--------------------------------------------------------------------------
12401244
# Clean Cmake build and install directories if needed

test_util.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,8 @@ def get_args(arg_string=None):
392392
help="log file to write output to (in addition to stdout")
393393
suite_options.add_argument("--clean_testdir", action="store_true",
394394
help="remove individual test directory after each passed test")
395+
suite_options.add_argument("--delete_exe", action="store_true",
396+
help="remove executable in test directory after each passed test")
395397

396398
comp_options = parser.add_argument_group("comparison options",
397399
"options that control how the comparisons are done")

0 commit comments

Comments
 (0)