diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-02 00:45:39 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-02 00:48:32 -0500 |
commit | 95e08cc46fb499866f2491b4a8aad9fe29ac6a00 (patch) | |
tree | ca131c3280cebc30bbdb6bf96aa230096e0793e2 /test/LedgerHarness.py | |
parent | 307b63be77f932ce7cf9685be261f1c3786ea719 (diff) | |
download | fork-ledger-95e08cc46fb499866f2491b4a8aad9fe29ac6a00.tar.gz fork-ledger-95e08cc46fb499866f2491b4a8aad9fe29ac6a00.tar.bz2 fork-ledger-95e08cc46fb499866f2491b4a8aad9fe29ac6a00.zip |
Make the source directory available to all tests
Diffstat (limited to 'test/LedgerHarness.py')
-rwxr-xr-x | test/LedgerHarness.py | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/test/LedgerHarness.py b/test/LedgerHarness.py index cf65f590..7e8cfa3d 100755 --- a/test/LedgerHarness.py +++ b/test/LedgerHarness.py @@ -7,22 +7,27 @@ import re from subprocess import Popen, PIPE class LedgerHarness: - ledger = None - succeeded = 0 - failed = 0 - verify = False - gmalloc = False + ledger = None + sourcepath = None + succeeded = 0 + failed = 0 + verify = False + gmalloc = False def __init__(self, argv): if not os.path.isfile(argv[1]): print "Cannot find ledger at '%s'" % argv[1] sys.exit(1) + if not os.path.isdir(argv[2]): + print "Cannot find source path at '%s'" % argv[2] + sys.exit(1) - self.ledger = argv[1] - self.succeeded = 0 - self.failed = 0 - self.verify = '--verify' in argv - self.gmalloc = '--gmalloc' in argv + self.ledger = argv[1] + self.sourcepath = argv[2] + self.succeeded = 0 + self.failed = 0 + self.verify = '--verify' in argv + self.gmalloc = '--gmalloc' in argv def run(self, command, verify=None, gmalloc=None, columns=True): env = os.environ.copy() |