from string import join from difflib import unified_diff from LedgerHarness import LedgerHarness args = sys.argv jobs = 1 match = re.match('-j([0-9]+)?', args[1]) if match: args = [args[0]] + args[2:] if match.group(1): jobs = int(match.group(1)) if jobs == 1: multiproc = False harness = LedgerHarness(args) tests = args[3] if not os.path.isdir(tests) and not os.path.isfile(tests): sys.exit(1) class RegressFile(object): def __init__(self, filename): self.filename = filename self.fd = open(self.filename) def transform_line(self, line): line = re.sub('\$sourcepath', harness.sourcepath, line) return line
#!/usr/bin/python # This script confirms both that the register report "adds up", and that its # final balance is the same as what the balance report shows. import sys import os import re from LedgerHarness import LedgerHarness harness = LedgerHarness(sys.argv) tests = sys.argv[3] if not os.path.isdir(tests) and not os.path.isfile(tests): sys.stderr.write("'%s' is not a directory or file (cwd %s)" % (tests, os.getcwd())) sys.exit(1) commands = [ "-f '$tests/standard.dat' -O 0ecbb1b15e2cf3e515cc0f8533e5bb0fb2326728", "-f '$tests/standard.dat' -B c56a21d23a6535184e7152ee138c28974f14280c", "-f '$tests/standard.dat' -V c56a21d23a6535184e7152ee138c28974f14280c", "-f '$tests/standard.dat' -G c56a21d23a6535184e7152ee138c28974f14280c", "-f '$tests/standard.dat' -B c0226fafdf9e6711ac9121cf263e2d50791859cb", "-f '$tests/standard.dat' -V c0226fafdf9e6711ac9121cf263e2d50791859cb", "-f '$tests/standard.dat' -G c0226fafdf9e6711ac9121cf263e2d50791859cb" ] def clean(num):