Mercurial > hg > truffle
comparison mx/mx_graal.py @ 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 | cc844a4512f1 |
children | 9dcd5407a603 |
comparison
equal
deleted
inserted
replaced
15013:deea05f9c316 | 15014:a588d99d4be1 |
---|---|
1358 | 1358 |
1359 def _blackhole(x): | 1359 def _blackhole(x): |
1360 mx.logv(x[:-1]) | 1360 mx.logv(x[:-1]) |
1361 | 1361 |
1362 | 1362 |
1363 # (Re)install graal.jar into the local m2 repository since the micros-graal | 1363 env = os.environ.copy() |
1364 # benchmarks have it as a dependency | 1364 env['JAVA_HOME'] = _jdk(vmToCheck='server') |
1365 graalDist = mx.distribution('GRAAL') | 1365 env['MAVEN_OPTS'] = '-server' |
1366 cmd = ['mvn', 'install:install-file', '-q', | |
1367 '-Dfile=' + graalDist.path, '-DgroupId=com.oracle.graal', '-DartifactId=graal', | |
1368 '-Dversion=1.0-SNAPSHOT', '-Dpackaging=jar'] | |
1369 if graalDist.sourcesPath: | |
1370 cmd = cmd + ['-Dsources=' + graalDist.sourcesPath] | |
1371 mx.run(cmd) | |
1372 | |
1373 mx.log("Building benchmarks...") | 1366 mx.log("Building benchmarks...") |
1374 mx.run(['mvn', 'package'], cwd=jmhPath, out=_blackhole) | 1367 mx.run(['mvn', 'package'], cwd=jmhPath, out=_blackhole, env=env) |
1375 | 1368 |
1376 matchedSuites = set() | 1369 matchedSuites = set() |
1377 numBench = [0] | 1370 numBench = [0] |
1378 for micros in os.listdir(jmhPath): | 1371 for micros in os.listdir(jmhPath): |
1379 absoluteMicro = os.path.join(jmhPath, micros) | 1372 absoluteMicro = os.path.join(jmhPath, micros) |