summaryrefslogtreecommitdiff
path: root/py/allTests.py
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2004-09-03 22:11:20 +0000
committerMark Spruiell <mes@zeroc.com>2004-09-03 22:11:20 +0000
commit0337fd31dfa9d0e7482eb8d57a294fc5d01ac00f (patch)
tree985c542ecd5c8472663d5880bb10055608756754 /py/allTests.py
parenttype refactoring (diff)
downloadice-0337fd31dfa9d0e7482eb8d57a294fc5d01ac00f.tar.bz2
ice-0337fd31dfa9d0e7482eb8d57a294fc5d01ac00f.tar.xz
ice-0337fd31dfa9d0e7482eb8d57a294fc5d01ac00f.zip
test fixes
Diffstat (limited to 'py/allTests.py')
-rwxr-xr-xpy/allTests.py86
1 files changed, 86 insertions, 0 deletions
diff --git a/py/allTests.py b/py/allTests.py
new file mode 100755
index 00000000000..a30ed01715f
--- /dev/null
+++ b/py/allTests.py
@@ -0,0 +1,86 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# Copyright (c) 2003-2004 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+import os, sys
+import getopt
+
+for toplevel in [".", "..", "../..", "../../..", "../../../.."]:
+ toplevel = os.path.normpath(toplevel)
+ if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")):
+ break
+else:
+ raise "can't find toplevel directory!"
+
+sys.path.append(os.path.join(toplevel, "config"))
+import TestUtil
+
+def runTests(tests, num = 0):
+
+ #
+ # Run each of the tests.
+ #
+ for i in tests:
+
+ 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
+
+ status = os.system(os.path.join(dir, "run.py"))
+
+ 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.
+#
+tests = [ \
+ "Ice/adapterDeactivation", \
+ "Ice/exceptions", \
+ "Ice/facets", \
+ "Ice/faultTolerance", \
+ "Ice/inheritance", \
+ "Ice/objects", \
+ "Ice/operations", \
+ "Ice/slicing/exceptions", \
+ "Ice/slicing/objects", \
+ ]
+
+def usage():
+ print "usage: " + sys.argv[0] + " [-l]"
+ sys.exit(2)
+
+try:
+ opts, args = getopt.getopt(sys.argv[1:], "l")
+except getopt.GetoptError:
+ usage()
+
+if(args):
+ usage()
+
+loop = 0
+for o, a in opts:
+ if o == "-l":
+ loop = 1
+
+if loop:
+ num = 1
+ while 1:
+ runTests(tests, num)
+ num += 1
+else:
+ runTests(tests)