diff options
Diffstat (limited to 'cpp/allTests.py')
-rwxr-xr-x | cpp/allTests.py | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/cpp/allTests.py b/cpp/allTests.py index 60f469568bd..0e7997bd70a 100755 --- a/cpp/allTests.py +++ b/cpp/allTests.py @@ -51,25 +51,25 @@ def runTests(args, tests, num = 0): # for i in tests: - i = os.path.normpath(i) - dir = os.path.join(toplevel, "test", i) + i = os.path.normpath(i) + dir = os.path.join(toplevel, "test", i) - print - if(num > 0): - print "[" + str(num) + "]", - print "*** running tests in " + dir, - print + print + if(num > 0): + print "[" + str(num) + "]", + print "*** running tests in " + dir, + print if isWin9x(): - status = os.system("python " + os.path.join(dir, "run.py " + args)) + status = os.system("python " + os.path.join(dir, "run.py " + args)) else: status = os.system(os.path.join(dir, "run.py " + args)) - if status: - if(num > 0): - print "[" + str(num) + "]", - print "test in " + dir + " failed with exit status", status, - sys.exit(status) + if status: + if(num > 0): + print "[" + str(num) + "]", + print "test in " + dir + " failed with exit status", status, + sys.exit(status) # # List of all basic tests. @@ -142,7 +142,7 @@ def usage(): try: opts, args = getopt.getopt(sys.argv[1:], "lr:R:", \ - ["debug", "protocol=", "compress", "host=", "threadPerConnection", "disablePool"]) + ["debug", "protocol=", "compress", "host=", "threadPerConnection", "disablePool"]) except getopt.GetoptError: usage() @@ -155,26 +155,26 @@ for o, a in opts: if o == "-l": loop = 1 if o == "-r" or o == '-R': - import re - regexp = re.compile(a) - if o == '-r': - def rematch(x): return regexp.search(x) - else: - def rematch(x): return not regexp.search(x) - tests = filter(rematch, tests) + import re + regexp = re.compile(a) + if o == '-r': + def rematch(x): return regexp.search(x) + else: + def rematch(x): return not regexp.search(x) + tests = filter(rematch, tests) if o == "--protocol": - if a not in ( "ssl", "tcp"): - usage() - args += " " + o + " " + a + if a not in ( "ssl", "tcp"): + usage() + args += " " + o + " " + a if o == "--host" : - args += " " + o + " " + a + args += " " + o + " " + a if o in ( "--debug", "--compress", "--threadPerConnection", "--disablePool" ): - args += " " + o + args += " " + o if loop: num = 1 while 1: - runTests(args, tests, num) - num += 1 + runTests(args, tests, num) + num += 1 else: runTests(args, tests) |