summaryrefslogtreecommitdiff
path: root/php/allTests.py
diff options
context:
space:
mode:
Diffstat (limited to 'php/allTests.py')
-rwxr-xr-xphp/allTests.py48
1 files changed, 24 insertions, 24 deletions
diff --git a/php/allTests.py b/php/allTests.py
index 0ef0e1b4220..62f603e5b97 100755
--- a/php/allTests.py
+++ b/php/allTests.py
@@ -25,22 +25,22 @@ 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
status = os.system("python " + os.path.join(dir, "run.py " + args))
- if status and not (sys.platform.startswith("aix") and status == 256):
- if(num > 0):
- print "[" + str(num) + "]",
- print "test in " + dir + " failed with exit status", status,
- sys.exit(status)
+ if status and not (sys.platform.startswith("aix") and status == 256):
+ if(num > 0):
+ print "[" + str(num) + "]",
+ print "test in " + dir + " failed with exit status", status,
+ sys.exit(status)
#
# List of all basic tests.
@@ -62,7 +62,7 @@ def usage():
try:
opts, args = getopt.getopt(sys.argv[1:], "lr:R:", \
- ["debug", "protocol=", "compress", "host=", "threadPerConnection"])
+ ["debug", "protocol=", "compress", "host=", "threadPerConnection"])
except getopt.GetoptError:
usage()
@@ -75,23 +75,23 @@ 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 in ( "--protocol", "--host" ):
- args += " " + o + " " + a
+ args += " " + o + " " + a
if o in ( "--debug", "--compress", "--threadPerConnection" ):
- 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)