Skip to content

Commit d8849ba

Browse files
authored
Merge pull request #151 from BenWibking/delete-exe
add option to delete executable if test passes
2 parents 6e28c54 + 28c7277 commit d8849ba

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
@@ -1246,6 +1246,10 @@ def test_suite(argv):
12461246

12471247
# switch to the full test directory
12481248
os.chdir(suite.full_test_dir)
1249+
if args.delete_exe:
1250+
suite.log.log("removing executable from test directory...")
1251+
os.remove(executable)
1252+
12491253

12501254
#--------------------------------------------------------------------------
12511255
# 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
@@ -395,6 +395,8 @@ def get_args(arg_string=None):
395395
help="log file to write output to (in addition to stdout")
396396
suite_options.add_argument("--clean_testdir", action="store_true",
397397
help="remove individual test directory after each passed test")
398+
suite_options.add_argument("--delete_exe", action="store_true",
399+
help="remove executable in test directory after each passed test")
398400

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

0 commit comments

Comments
 (0)