diff mx/mx_graal.py @ 15593:e381346a8223

JMH: do not abort on missing jar file. Create necessary output directory if needed
author Gilles Duboscq <duboscq@ssw.jku.at>
date Thu, 08 May 2014 15:05:06 +0200
parents ce201bb843b4
children 62738ce98804
line wrap: on
line diff
--- 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:"):