Mercurial > hg > truffle
comparison mx/mx_graal.py @ 14930:5c7718ae8c86
install graal.jar into local Maven repo if MAVEN_INSTALL_GRAAL_JAR environment variable is "true"
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 01 Apr 2014 22:48:07 +0200 |
parents | 31a9c79399c8 |
children | 9d32e87ea98b |
comparison
equal
deleted
inserted
replaced
14929:de31e0f56fe7 | 14930:5c7718ae8c86 |
---|---|
401 os.unlink(toDelete) | 401 os.unlink(toDelete) |
402 | 402 |
403 def _installGraalJarInJdks(graalDist): | 403 def _installGraalJarInJdks(graalDist): |
404 graalJar = graalDist.path | 404 graalJar = graalDist.path |
405 jdks = _jdksDir() | 405 jdks = _jdksDir() |
406 | |
407 m2Install = mx.get_env('MAVEN_INSTALL_GRAAL_JAR', None) | |
408 if m2Install and m2Install.lower() == 'true': | |
409 mx.run(['mvn', 'install:install-file', '-q', | |
410 '-Dfile=' + graalJar, '-DgroupId=com.oracle.graal', '-DartifactId=graal', | |
411 '-Dversion=1.0-SNAPSHOT', '-Dpackaging=jar']) | |
412 | |
406 if exists(jdks): | 413 if exists(jdks): |
407 for e in os.listdir(jdks): | 414 for e in os.listdir(jdks): |
408 jreLibDir = join(jdks, e, 'jre', 'lib') | 415 jreLibDir = join(jdks, e, 'jre', 'lib') |
409 if exists(jreLibDir): | 416 if exists(jreLibDir): |
410 # do a copy and then a move to get atomic updating (on Unix) of graal.jar in the JRE | 417 # do a copy and then a move to get atomic updating (on Unix) of graal.jar in the JRE |
1341 # TODO: add options to pass through arguments directly to JMH | 1348 # TODO: add options to pass through arguments directly to JMH |
1342 | 1349 |
1343 vmArgs, benchmarks = _extract_VM_args(args) | 1350 vmArgs, benchmarks = _extract_VM_args(args) |
1344 jmhPath = mx.get_env('JMH_BENCHMARKS', None) | 1351 jmhPath = mx.get_env('JMH_BENCHMARKS', None) |
1345 if not jmhPath or not exists(jmhPath): | 1352 if not jmhPath or not exists(jmhPath): |
1346 mx.abort("$JMH_BENCHMARKS not properly definied") | 1353 mx.abort("$JMH_BENCHMARKS not properly defined: " + str(jmhPath)) |
1347 | 1354 |
1348 def _blackhole(x): | 1355 def _blackhole(x): |
1349 mx.logv(x[:-1]) | 1356 mx.logv(x[:-1]) |
1350 mx.log("Building benchmarks...") | 1357 mx.log("Building benchmarks...") |
1351 mx.run(['mvn', 'package'], cwd=jmhPath, out=_blackhole) | 1358 mx.run(['mvn', 'package'], cwd=jmhPath, out=_blackhole) |