diff --git a/test/reptest b/test/reptest index 359bd5859cccf7ab7a6e78b50446f2904c280edb..f1361b7e148ab91fcdca8609f33085483f56366a 100755 --- a/test/reptest +++ b/test/reptest @@ -11,6 +11,9 @@ RUNS = 50 REGISTRY = 'gitlab-registry.cern.ch/hep-benchmarks/hep-workloads' def help(): + + global RUNS + print "reptest {-sd} [-v] [-r RUNS] [-L | -R REGISTRY] OUTPUTDIR BENCHMARK [BENCHMARK_OPTIONS] ...}" print "reptest -h" print "Option overview:" @@ -18,9 +21,15 @@ def help(): print "-v Display verbose output, including all scores" print "-d Run Docker test" print "-s Run Singularity test" - print "-n RUNS Number of runs to execute" - print "-R REGISTRY Use an alternate (intead of official) Docker registry" - print "-L Run container via local Docker daemon (cannot be used with -s)\n" + print "-n RUNS Number of runs to execute (default " + str(RUNS) + ")" + print "-R REGISTRY Use an alternate (instead of official) Docker registry" + print "-L Run container via local Docker daemon (cannot be used with -s)" + print "\nExamples" + print "--------" + print "Run 'lhcb-gen-sim' 10 times in Docker and Singularity, displaying all scores:" + print "reptest -sdv -n 10 /tmp/hwoutput lhcb-gen-sim" + print "Run 'atlas-sim-bmk' 5 times in Docker:" + print "reptest -d -n 5 /tmp/hwoutput atlas-sim-bmk" def procres(rpath, verbose): @@ -53,6 +62,11 @@ def procres(rpath, verbose): score = jscore[score_key]['score'] if verbose: print score + try: + float(score) + except ValueError: + print "\nError: invalid score for one or more runs!" + sys.exit(2) scores.append(score) if len(scores)!=RUNS: