diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2008-02-05 14:02:38 -0330 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2008-02-05 14:02:38 -0330 |
commit | e4dadd4907bdc43f35f87a743fb6ba89df53257d (patch) | |
tree | b6928dfd4601a8e8d989661dc6a072483b23f39d /cpp/allDemos.py | |
parent | Minor fix (diff) | |
download | ice-e4dadd4907bdc43f35f87a743fb6ba89df53257d.tar.bz2 ice-e4dadd4907bdc43f35f87a743fb6ba89df53257d.tar.xz ice-e4dadd4907bdc43f35f87a743fb6ba89df53257d.zip |
Bug 1373 - allowable property names in config files
Added continue to allDemos scripts
Diffstat (limited to 'cpp/allDemos.py')
-rwxr-xr-x | cpp/allDemos.py | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/cpp/allDemos.py b/cpp/allDemos.py index 98936c9d3cc..66cd79d559c 100755 --- a/cpp/allDemos.py +++ b/cpp/allDemos.py @@ -10,6 +10,9 @@ import os, sys, getopt, re +keepGoing = False +testErrors = [] + def isCygwin(): # The substring on sys.platform is required because some cygwin # versions return variations like "cygwin_nt-4.01". @@ -20,6 +23,8 @@ if sys.platform == "win32": sys.exit(1) def runDemos(args, demos, num = 0): + global testErrors + global keepGoing rootPath = "demo" if not os.path.exists(rootPath): @@ -51,8 +56,15 @@ def runDemos(args, demos, num = 0): if status: if(num > 0): print "[" + str(num) + "]", - print "test in " + dir + " failed with exit status", status, - sys.exit(status) + message = "demo in " + dir + " failed with exit status", status, + print message + if keepGoing == False: + print "exiting" + sys.exit(status) + else: + print " ** Error logged and will be displayed again when suite is completed **" + testErrors.append(message) + # # List of all basic demos. @@ -112,11 +124,13 @@ def usage(): print " --trace Run the demos with tracing enabled." print " --host=host Set --Ice.Default.Host=<host>." print " --mode=debug|release Run the demos with debug or release mode builds (win32 only)." + print " --continue Keep running when a demo fails." sys.exit(2) try: opts, args = getopt.getopt(sys.argv[1:], "lr:R:", [ - "filter=", "rfilter=", "start-after=", "start=", "loop", "fast", "trace", "debug", "host=", "mode="]) + "filter=", "rfilter=", "start-after=", "start=", "loop", "fast", "trace", "debug", "host=", "mode=", + "continue"]) except getopt.GetoptError: usage() @@ -136,6 +150,8 @@ arg = "" for o, a in opts: if o in ("-l", "--loop"): loop = True + elif o in ("-c", "--continue"): + keepGoing = True elif o in ("-r", "-R", "--filter", '--rfilter'): regexp = re.compile(a) if o in ("--rfilter", "-R"): @@ -165,3 +181,9 @@ if loop: num += 1 else: runDemos(arg, demos) + +if len(testErrors) > 0: + print "The following errors occurred:" + for x in testErrors: + print x + |