Resolved conflicts in valgrind.py.
@@ -2,7 +2,6 @@ import os
import subprocess
import sys
-<<<<<<< HEAD
subdir = sorted([f.name for f in os.scandir('.') if f.is_dir()])
# First make debug
@@ -17,18 +16,6 @@ with open('make_log','w') as m:
subprocess.run(['rm','make_log'])
os.chdir('tests/')
-=======
-import numpy as np
-
-subdir = [f.name for f in os.scandir(".") if f.is_dir()]
-
-# First make debug
-sys.stdout.write("Making VPLanet...")
-sys.stdout.flush()
-os.chdir("..")
-subprocess.run(["make debug >& /dev/null"], shell=True)
-os.chdir("tests")
->>>>>>> 0b3ea1c78b49901fe8c6b823f81d8ff0c84f81f8
print("done.")
@@ -40,7 +27,6 @@ for sub in subdir:
#sys.stdout.write("")
sys.stdout.flush()
os.chdir(sub)
-<<<<<<< HEAD
fout = sub +'.valgrind'
#cmd='/usr/bin/valgrind --track-origins=yes ../../bin/vplanet vpl.in &> '+ fout
cmd='/usr/bin/valgrind --track-origins=yes ../../bin/vplanet vpl.in '
@@ -50,11 +36,6 @@ for sub in subdir:
with open(fout,"w+") as f:
subprocess.run(cmd, shell=True,stdout=f,stderr=f)
-=======
- fout = sub + ".valgrind"
- cmd = "valgrind --track-origins=yes ../../vplanet vpl.in >& " + fout
- subprocess.run(cmd, shell=True)
->>>>>>> 0b3ea1c78b49901fe8c6b823f81d8ff0c84f81f8
f = open(fout, "r")
last_line = f.readlines()[-1]
#print(last_line)
@@ -63,7 +44,6 @@ for sub in subdir:
n_errors = int(words[3])
if n_errors > 0:
tot_fail += 1
-<<<<<<< HEAD
print(': '+repr(n_errors)+' error(s)')
os.chdir('../')
@@ -76,14 +56,3 @@ if (tot_fail == 0):
else:
print(repr(tot_fail)+'/'+repr(tot_test)+' test(s) failed.')
assert(False)
-=======
- print(": " + repr(n_errors) + " error(s)")
- os.chdir("..")
-
-sys.stdout.write("Done! ")
-
-if tot_fail == 0:
- print("VPLanet is mem-check-clean!")
-else:
- print(repr(tot_fail) + "/" + repr(tot_test) + " test(s) failed.")
->>>>>>> 0b3ea1c78b49901fe8c6b823f81d8ff0c84f81f8
