changeset 15014:a588d99d4be1

jmh command ensures Maven is run with a Graal enabled VM
author Doug Simon <doug.simon@oracle.com>
date Mon, 07 Apr 2014 22:20:23 +0200
parents deea05f9c316
children 05e5ab3d4d0f
files mx/mx_graal.py
diffstat 1 files changed, 4 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/mx/mx_graal.py	Mon Apr 07 20:52:27 2014 +0200
+++ b/mx/mx_graal.py	Mon Apr 07 22:20:23 2014 +0200
@@ -1360,18 +1360,11 @@
         mx.logv(x[:-1])
 
 
-    # (Re)install graal.jar into the local m2 repository since the micros-graal
-    # benchmarks have it as a dependency
-    graalDist = mx.distribution('GRAAL')
-    cmd = ['mvn', 'install:install-file', '-q',
-           '-Dfile=' + graalDist.path, '-DgroupId=com.oracle.graal', '-DartifactId=graal',
-           '-Dversion=1.0-SNAPSHOT', '-Dpackaging=jar']
-    if graalDist.sourcesPath:
-        cmd = cmd + ['-Dsources=' + graalDist.sourcesPath]
-    mx.run(cmd)
-
+    env = os.environ.copy()
+    env['JAVA_HOME'] = _jdk(vmToCheck='server')
+    env['MAVEN_OPTS'] = '-server'
     mx.log("Building benchmarks...")
-    mx.run(['mvn', 'package'], cwd=jmhPath, out=_blackhole)
+    mx.run(['mvn', 'package'], cwd=jmhPath, out=_blackhole, env=env)
 
     matchedSuites = set()
     numBench = [0]