# HG changeset patch # User Gilles Duboscq # Date 1327617308 -3600 # Node ID 0d661161fa2490b8ec4ce1b4cfd39a3c8f9a881b # Parent 0893aef10ed4a80d54b1904417242c7cefba6df4 Add possibility to run individual DaCapo & SPECjvm2008 benchmarks, small fix in success and score regular expressions for SPECjvm2008 diff -r 0893aef10ed4 -r 0d661161fa24 mx/commands.py --- a/mx/commands.py Thu Jan 26 22:54:39 2012 +0100 +++ b/mx/commands.py Thu Jan 26 23:35:08 2012 +0100 @@ -538,12 +538,23 @@ #DaCapo if ('dacapo' in args or 'all' in args): benchmarks += sanitycheck.getDacapos(level=sanitycheck.SanityCheckLevel.Benchmark) + else: + dacapos = [a[7:] for a in args if a.startswith('dacapo:')] + for dacapo in dacapos: + if dacapo not in sanitycheck.dacapoSanityWarmup.keys(): + mx.abort('Unknown dacapo : ' + dacapo) + benchmarks += [sanitycheck.getDacapo(dacapo, sanitycheck.dacapoSanityWarmup[dacapo][sanitycheck.SanityCheckLevel.Benchmark])] + #Bootstrap if ('bootstrap' in args or 'all' in args): benchmarks += sanitycheck.getBootstraps() #SPECjvm2008 if ('specjvm2008' in args or 'all' in args): benchmarks += [sanitycheck.getSPECjvm2008(None, True, 120, 120)] + else: + specjvms = [a[12:] for a in args if a.startswith('specjvm2008:')] + for specjvm in specjvms: + benchmarks += [sanitycheck.getSPECjvm2008([specjvm], True, 120, 120)] for test in benchmarks: if not results.has_key(test.group): diff -r 0893aef10ed4 -r 0d661161fa24 mx/sanitycheck.py --- a/mx/sanitycheck.py Thu Jan 26 22:54:39 2012 +0100 +++ b/mx/sanitycheck.py Thu Jan 26 23:35:08 2012 +0100 @@ -72,10 +72,10 @@ if specjvm2008 is None or not exists(join(specjvm2008, 'SPECjvm2008.jar')): mx.abort('Please set the SPECJVM2008 environment variable to a SPECjvm2008 directory') - score = re.compile(r"^(Score on|Noncompliant) (?P[a-zA-Z0-9\.\-]+)( result)?: (?P[0-9]+(,|\.)[0-9]+)( SPECjvm2008 Base)? ops/m$") + score = re.compile(r"^(Score on|Noncompliant) (?P[a-zA-Z0-9\._]+)( result)?: (?P[0-9]+(,|\.)[0-9]+)( SPECjvm2008 Base)? ops/m$") error = re.compile(r"^Errors in benchmark: ") # The ' ops/m' at the end of the success string is important : it's how you can tell valid and invalid runs apart - success = re.compile(r"^(Noncompliant c|C)omposite result: [0-9]+,[0-9]+( SPECjvm2008 (Base|Peak))? ops/m$") + success = re.compile(r"^(Noncompliant c|C)omposite result: [0-9]+(,|\.)[0-9]+( SPECjvm2008 (Base|Peak))? ops/m$") matcher = Matcher(score, {'const:name' : 'benchmark', 'const:score' : 'score'}, startNewLine=True) opts = []