Skip to content
Snippets Groups Projects
Commit 430b711c authored by Christopher Henry Hollowell's avatar Christopher Henry Hollowell
Browse files

Merge branch 'reptest' into qa

parents 9663590e a0affeb7
No related branches found
No related tags found
4 merge requests!239Qa,!237merge from qa,!230Huge set of changes to move to new code refactory,!171Include example usage in reptest
...@@ -11,6 +11,9 @@ RUNS = 50 ...@@ -11,6 +11,9 @@ RUNS = 50
REGISTRY = 'gitlab-registry.cern.ch/hep-benchmarks/hep-workloads' REGISTRY = 'gitlab-registry.cern.ch/hep-benchmarks/hep-workloads'
def help(): def help():
global RUNS
print "reptest {-sd} [-v] [-r RUNS] [-L | -R REGISTRY] OUTPUTDIR BENCHMARK [BENCHMARK_OPTIONS] ...}" print "reptest {-sd} [-v] [-r RUNS] [-L | -R REGISTRY] OUTPUTDIR BENCHMARK [BENCHMARK_OPTIONS] ...}"
print "reptest -h" print "reptest -h"
print "Option overview:" print "Option overview:"
...@@ -18,9 +21,15 @@ def help(): ...@@ -18,9 +21,15 @@ def help():
print "-v Display verbose output, including all scores" print "-v Display verbose output, including all scores"
print "-d Run Docker test" print "-d Run Docker test"
print "-s Run Singularity test" print "-s Run Singularity test"
print "-n RUNS Number of runs to execute" print "-n RUNS Number of runs to execute (default " + str(RUNS) + ")"
print "-R REGISTRY Use an alternate (intead of official) Docker registry" print "-R REGISTRY Use an alternate (instead of official) Docker registry"
print "-L Run container via local Docker daemon (cannot be used with -s)\n" 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): def procres(rpath, verbose):
...@@ -53,6 +62,11 @@ def procres(rpath, verbose): ...@@ -53,6 +62,11 @@ def procres(rpath, verbose):
score = jscore[score_key]['score'] score = jscore[score_key]['score']
if verbose: if verbose:
print score print score
try:
float(score)
except ValueError:
print "\nError: invalid score for one or more runs!"
sys.exit(2)
scores.append(score) scores.append(score)
if len(scores)!=RUNS: if len(scores)!=RUNS:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment