Skip to content

Commit

Permalink
Merge pull request #151 from BenWibking/delete-exe
Browse files Browse the repository at this point in the history
add option to delete executable if test passes
  • Loading branch information
zingale authored Jan 9, 2025
2 parents 6e28c54 + 28c7277 commit d8849ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions regtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit d8849ba

Please sign in to comment.