@@ -0,0 +1,2039 @@
+#!/usr/bin/env python%0A%0Afrom optparse import OptionParser%0A%0Aimport timedRun%0Aimport filecmp%0A%0A%0Adef parseOptions(arguments):%0A    parser = OptionParser()%0A    parser.disable_interspersed_args()%0A    parser.add_option('-t', '--timeout', type='int', action='store', dest='condTimeout',%0A                      default=120,%0A                      help='Optionally set the timeout. Defaults to %22%25default%22 seconds.')%0A    parser.add_option('-a', '--a-arg', type='string', action='append', dest='aArgs',%0A                      default=%5B%5D,%0A                      help='Set of extra arguments given to first run.')%0A    parser.add_option('-b', '--b-arg', type='string', action='append', dest='bArgs',%0A                      default=%5B%5D,%0A                      help='Set of extra arguments given to second run.')%0A%0A    options, args = parser.parse_args(arguments)%0A%0A    return options.condTimeout, options.aArgs, options.bArgs, args%0A%0Adef interesting(cliArgs, tempPrefix):%0A    (timeout, aArgs, bArgs, args) = parseOptions(cliArgs)%0A%0A    aRuninfo = timedRun.timed_run(args%5B:1%5D + aArgs + args%5B1:%5D, timeout, tempPrefix + %22-a%22)%0A    bRuninfo = timedRun.timed_run(args%5B:1%5D + bArgs + args%5B1:%5D, timeout, tempPrefix + %22-b%22)%0A    timeString = %22 (1st Run: %25.3f seconds) (2nd Run: %25.3f seconds)%22 %25 (aRuninfo.elapsedtime, bRuninfo.elapsedtime)%0A%0A    if aRuninfo.sta != timedRun.TIMED_OUT and bRuninfo.sta != timedRun.TIMED_OUT:%0A        if aRuninfo.rc != bRuninfo.rc:%0A            print (%22%5BInteresting%5D Different return code. (%25d, %25d) %22 %25 (aRuninfo.rc, bRuninfo.rc)) + timeString%0A            return True%0A        if not filecmp.cmp(aRuninfo.out, bRuninfo.out):%0A            print %22%5BInteresting%5D Different output. %22 + timeString%0A            return True%0A        if not filecmp.cmp(aRuninfo.err, bRuninfo.err):%0A            print %22%5BInteresting%5D Different error output. %22 + timeString%0A            return True%0A    else:%0A        print %22%5BUninteresting%5D At least one test timed out.%22 + timeString%0A        return False%0A%0A    print %22%5BUninteresting%5D Identical behaviour.%22 + timeString%0A    return False%0A

Add a new interesting test to check different behaviour based on command line switches.