diff --git a/regtest.py b/regtest.py index 40950d0..6794648 100755 --- a/regtest.py +++ b/regtest.py @@ -1246,6 +1246,10 @@ def test_suite(argv): # switch to the full test directory os.chdir(suite.full_test_dir) + if args.delete_exe: + suite.log.log("removing executable from test directory...") + os.remove(executable) + #-------------------------------------------------------------------------- # Clean Cmake build and install directories if needed diff --git a/test_util.py b/test_util.py index 0da1da8..6037b3e 100644 --- a/test_util.py +++ b/test_util.py @@ -395,6 +395,8 @@ def get_args(arg_string=None): help="log file to write output to (in addition to stdout") suite_options.add_argument("--clean_testdir", action="store_true", help="remove individual test directory after each passed test") + suite_options.add_argument("--delete_exe", action="store_true", + help="remove executable in test directory after each passed test") comp_options = parser.add_argument_group("comparison options", "options that control how the comparisons are done")