Skip to content
Snippets Groups Projects
Commit 5ab0fcfe authored by Domenico Giordano's avatar Domenico Giordano
Browse files

Merge branch 'qa' into 'qa'

Include example usage in reptest

See merge request !171
parents 8a0dbfe3 430b711c
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
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:
......
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