From e91f552c39cb46ddc879d8411154245441c8c47d Mon Sep 17 00:00:00 2001 From: RoryBarnes Date: Tue, 6 Feb 2024 15:46:40 -0800 Subject: [PATCH] Tidied up valgrind.py --- tests/valgrind.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tests/valgrind.py b/tests/valgrind.py index aa48a0f64..f7d0f6b41 100644 --- a/tests/valgrind.py +++ b/tests/valgrind.py @@ -5,27 +5,22 @@ # XXX Near duplicates in maketest.py, 02/06/24 def Main(): - # BuildVPLanet() + BuildVPLanet() + print("") dir_list = CollectAllTests() - print(dir_list) tot_fail = 0 tot_test = 0 for dir in dir_list: tot_test += 1 sys.stdout.write(dir) - # sys.stdout.write("") sys.stdout.flush() os.chdir(dir) subdirs = dir.split("/") test = subdirs[1] outfile = test + ".valgrind" - # cmd='/usr/bin/valgrind --track-origins=yes ../../bin/vplanet vpl.in &> '+ fout cmd = "/usr/bin/valgrind --track-origins=yes ../../../bin/vplanet vpl.in" - # print(cmd) - # cmd = cmd.split() - with open(outfile, "w+") as f: subprocess.run(cmd, shell=True, stdout=f, stderr=f) f = open(outfile, "r") @@ -38,7 +33,6 @@ def Main(): tot_fail += 1 print(": " + repr(n_errors) + " error(s)") os.chdir("../../") - exit() print("Done! ") @@ -62,7 +56,6 @@ def BuildVPLanet(): def CollectAllTests(): top_list = sorted(next(os.walk("."))[1]) - print(top_list) dir_list = [] for top in top_list: subdirs = [