Skip to content

Commit 2320e52

Browse files
authored
Merge pull request #104 from ax3l/fix-restartCustomRunCmd
Fix: restart test with custom run cmd
2 parents 441918a + 847018a commit 2320e52

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

regtest.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -670,15 +670,14 @@ def test_suite(argv):
670670

671671
base_cmd += f" {suite.globalAddToExecString} {test.runtime_params}"
672672

673-
if args.with_valgrind:
674-
base_cmd = "valgrind " + args.valgrind_options + " " + base_cmd
675-
676673
if test.run_as_script:
677674
base_cmd = f"./{test.run_as_script} {test.script_args}"
678675

679676
if test.customRunCmd is not None:
680677
base_cmd = test.customRunCmd
681678

679+
if args.with_valgrind:
680+
base_cmd = "valgrind " + args.valgrind_options + " " + base_cmd
682681

683682

684683
suite.run_test(test, base_cmd)
@@ -730,6 +729,17 @@ def test_suite(argv):
730729

731730
base_cmd += f" {suite.globalAddToExecString} {test.runtime_params}"
732731

732+
if test.run_as_script:
733+
base_cmd = f"./{test.run_as_script} {test.script_args}"
734+
# base_cmd += " amr.restart={}".format(restart_file)
735+
736+
if test.customRunCmd is not None:
737+
base_cmd = test.customRunCmd
738+
base_cmd += " amr.restart={}".format(restart_file)
739+
740+
if args.with_valgrind:
741+
base_cmd = "valgrind " + args.valgrind_options + " " + base_cmd
742+
733743
suite.run_test(test, base_cmd)
734744

735745
test.wall_time = time.time() - test.wall_time

0 commit comments

Comments
 (0)