# HG changeset patch # User Gilles Duboscq # Date 1399554306 -7200 # Node ID e381346a8223cdeed388e53b07e52e5d1c68a11a # Parent 07ca8c86d31cce8901f706c184236b7b031cd74f JMH: do not abort on missing jar file. Create necessary output directory if needed diff -r 07ca8c86d31c -r e381346a8223 mx/mx_graal.py --- a/mx/mx_graal.py Wed May 07 15:58:36 2014 +0200 +++ b/mx/mx_graal.py Thu May 08 15:05:06 2014 +0200 @@ -1623,8 +1623,11 @@ benchmarks = [b for b in benchmarksAndJsons if not b.startswith('{')] jmhArgJsons = [b for b in benchmarksAndJsons if b.startswith('{')] - - jmhArgs = {'-rff' : join(_graal_home, 'mx', 'jmh', 'jmh.out'), '-v' : 'EXTRA' if mx._opts.verbose else 'NORMAL'} + jmhOutDir = join(_graal_home, 'mx', 'jmh') + if not exists(jmhOutDir): + os.makedirs(jmhOutDir) + jmhOut = join(jmhOutDir, 'jmh.out') + jmhArgs = {'-rff' : jmhOut, '-v' : 'EXTRA' if mx._opts.verbose else 'NORMAL'} # e.g. '{"-wi" : 20}' for j in jmhArgJsons: @@ -1652,7 +1655,8 @@ microJar = os.path.join(absoluteMicro, "target", "microbenchmarks.jar") if not exists(microJar): - mx.abort('Missing ' + microJar + ' - please run "mx buildjmh"') + mx.log('Missing ' + microJar + ' - please run "mx buildjmh"') + continue if benchmarks: def _addBenchmark(x): if x.startswith("Benchmark:"):