summaryrefslogtreecommitdiff
path: root/test/LedgerHarness.py
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-03-17 16:47:33 -0500
committerJohn Wiegley <johnw@newartisans.com>2012-03-17 16:47:33 -0500
commit1240ce24b3dd59bb2f48a396043b4115cc49c6e1 (patch)
tree561f4b882e270951947fed1b04b591a3262dba0d /test/LedgerHarness.py
parent06934e8dd68a0dea1f113911b01dc6b7ed406330 (diff)
downloadfork-ledger-1240ce24b3dd59bb2f48a396043b4115cc49c6e1.tar.gz
fork-ledger-1240ce24b3dd59bb2f48a396043b4115cc49c6e1.tar.bz2
fork-ledger-1240ce24b3dd59bb2f48a396043b4115cc49c6e1.zip
Passing --verify to regression tests uses valgrind
Diffstat (limited to 'test/LedgerHarness.py')
-rwxr-xr-xtest/LedgerHarness.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/LedgerHarness.py b/test/LedgerHarness.py
index 564a4d32..3477e720 100755
--- a/test/LedgerHarness.py
+++ b/test/LedgerHarness.py
@@ -81,6 +81,13 @@ class LedgerHarness:
command = re.sub('\$ledger', '%s%s %s' % \
(self.ledger, insert, '--args-only'), command)
+ valgrind = '/usr/bin/valgrind'
+ if not os.path.isfile(valgrind):
+ valgrind = '/opt/local/bin/valgrind'
+
+ if os.path.isfile(valgrind) and '--verify' in insert:
+ command = valgrind + ' -q ' + command
+
return Popen(command, shell=True, close_fds=True, env=env,
stdin=PIPE, stdout=PIPE, stderr=PIPE)