summaryrefslogtreecommitdiff
path: root/cpp/allTests.py
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2004-02-19 13:20:06 +0000
committerMarc Laukien <marc@zeroc.com>2004-02-19 13:20:06 +0000
commit3d1e4a101bd5d2efbd52f25d62cee4278fc58a9f (patch)
treee8ed767e7210a6c0cf685885d2278daf4b11a5c0 /cpp/allTests.py
parentfix (diff)
downloadice-3d1e4a101bd5d2efbd52f25d62cee4278fc58a9f.tar.bz2
ice-3d1e4a101bd5d2efbd52f25d62cee4278fc58a9f.tar.xz
ice-3d1e4a101bd5d2efbd52f25d62cee4278fc58a9f.zip
fixes
Diffstat (limited to 'cpp/allTests.py')
-rwxr-xr-xcpp/allTests.py69
1 files changed, 39 insertions, 30 deletions
diff --git a/cpp/allTests.py b/cpp/allTests.py
index 210b340456c..0155c356dbd 100755
--- a/cpp/allTests.py
+++ b/cpp/allTests.py
@@ -14,6 +14,7 @@
# **********************************************************************
import os, sys
+import optparse
for toplevel in [".", "..", "../..", "../../..", "../../../.."]:
toplevel = os.path.normpath(toplevel)
@@ -25,6 +26,31 @@ else:
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
+
+ try:
+ execfile(os.path.join(dir, "run.py"))
+ except SystemExit, (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.
#
@@ -58,37 +84,20 @@ tests = [ \
"IceStorm/federation2", \
"FreezeScript/dbmap", \
"FreezeScript/evictor", \
-# "IcePack/simple", \
-# "IcePack/deployer", \
+ "IcePack/simple", \
+ "IcePack/deployer", \
"Glacier/starter", \
]
-#
-# The user can supply a subset of tests on the command line.
-#
-if sys.argv[1:]:
- print "limiting tests"
- newtests = []
- for i in tests:
- if i in sys.argv[1:]:
- newtests.append(i)
- tests = newtests
-
-#
-# Run each of the tests.
-#
-for i in tests:
+parser = optparse.OptionParser()
+parser.add_option("-l", "--loop", action="store_true", dest="loop", default=False,
+ help="run tests continously in an endless loop")
+(options, args) = parser.parse_args()
- i = os.path.normpath(i)
- dir = os.path.join(toplevel, "test", i)
-
- print
- print "*** running tests in " + dir + ":"
- print
-
- try:
- execfile(os.path.join(dir, "run.py"))
- except SystemExit, (status,):
- if status:
- print "test failed with exit status", status
- sys.exit(status)
+if options.loop:
+ num = 1
+ while 1:
+ runTests(tests, num)
+ num += 1
+else:
+ runTests(tests)