diff options
author | Marc Laukien <marc@zeroc.com> | 2004-02-19 13:58:46 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2004-02-19 13:58:46 +0000 |
commit | 7040f951e15b1dc98dfa07f017c3e7fe8ed5c450 (patch) | |
tree | 3a40a8847ae6fe0993d7d61019f3ff6a12c2f6c5 /cpp | |
parent | fixes (diff) | |
download | ice-7040f951e15b1dc98dfa07f017c3e7fe8ed5c450.tar.bz2 ice-7040f951e15b1dc98dfa07f017c3e7fe8ed5c450.tar.xz ice-7040f951e15b1dc98dfa07f017c3e7fe8ed5c450.zip |
fix
Diffstat (limited to 'cpp')
-rwxr-xr-x | cpp/allTests.py | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/cpp/allTests.py b/cpp/allTests.py index 0155c356dbd..df20220df10 100755 --- a/cpp/allTests.py +++ b/cpp/allTests.py @@ -14,7 +14,7 @@ # ********************************************************************** import os, sys -import optparse +import getopt for toplevel in [".", "..", "../..", "../../..", "../../../.."]: toplevel = os.path.normpath(toplevel) @@ -89,14 +89,26 @@ tests = [ \ "Glacier/starter", \ ] -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() +def usage(): + print "usage: " + sys.argv[0] + " [-l]" + sys.exit(2) -if options.loop: +try: + opts, args = getopt.getopt(sys.argv[1:], "l") +except getopt.GetoptError: + usage() + +if(args): + usage() + +loop = False +for o, a in opts: + if o == "-l": + loop = True + +if loop: num = 1 - while 1: + while True: runTests(tests, num) num += 1 else: |