diff options
Diffstat (limited to 'java/allDemos.py')
-rwxr-xr-x | java/allDemos.py | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/java/allDemos.py b/java/allDemos.py index d511afbc961..d70d265f19e 100755 --- a/java/allDemos.py +++ b/java/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. @@ -102,11 +114,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() @@ -126,6 +140,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"): @@ -155,3 +171,8 @@ if loop: num += 1 else: runDemos(arg, demos) + +if len(testErrors) > 0: + print "The following errors occurred:" + for x in testErrors: + print x |