Mercurial > hg > graal-jvmci-8
comparison mx/mx_graal.py @ 14965:c64cd1dd4bd1
moved Maven installation of Graal dependency from build to jmh command
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 03 Apr 2014 20:54:30 +0200 |
parents | 9d32e87ea98b |
children | cc844a4512f1 |
comparison
equal
deleted
inserted
replaced
14964:e1ce6c66f56e | 14965:c64cd1dd4bd1 |
---|---|
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 cmd = ['mvn', 'install:install-file', '-q', | |
410 '-Dfile=' + graalJar, '-DgroupId=com.oracle.graal', '-DartifactId=graal', | |
411 '-Dversion=1.0-SNAPSHOT', '-Dpackaging=jar'] | |
412 if graalDist.sourcesPath: | |
413 cmd = cmd + ['-Dsources=' + graalDist.sourcesPath] | |
414 mx.run(cmd) | |
415 | 406 |
416 if exists(jdks): | 407 if exists(jdks): |
417 for e in os.listdir(jdks): | 408 for e in os.listdir(jdks): |
418 jreLibDir = join(jdks, e, 'jre', 'lib') | 409 jreLibDir = join(jdks, e, 'jre', 'lib') |
419 if exists(jreLibDir): | 410 if exists(jreLibDir): |
1361 if not jmhPath or not exists(jmhPath): | 1352 if not jmhPath or not exists(jmhPath): |
1362 mx.abort("$JMH_BENCHMARKS not properly defined: " + str(jmhPath)) | 1353 mx.abort("$JMH_BENCHMARKS not properly defined: " + str(jmhPath)) |
1363 | 1354 |
1364 def _blackhole(x): | 1355 def _blackhole(x): |
1365 mx.logv(x[:-1]) | 1356 mx.logv(x[:-1]) |
1357 | |
1358 | |
1359 # (Re)install graal.jar into the local m2 repository since the micros-graal | |
1360 # benchmarks have it as a dependency | |
1361 graalDist = mx.distribution('GRAAL') | |
1362 cmd = ['mvn', 'install:install-file', '-q', | |
1363 '-Dfile=' + graalDist.path, '-DgroupId=com.oracle.graal', '-DartifactId=graal', | |
1364 '-Dversion=1.0-SNAPSHOT', '-Dpackaging=jar'] | |
1365 if graalDist.sourcesPath: | |
1366 cmd = cmd + ['-Dsources=' + graalDist.sourcesPath] | |
1367 mx.run(cmd) | |
1368 | |
1366 mx.log("Building benchmarks...") | 1369 mx.log("Building benchmarks...") |
1367 mx.run(['mvn', 'package'], cwd=jmhPath, out=_blackhole) | 1370 mx.run(['mvn', 'package'], cwd=jmhPath, out=_blackhole) |
1368 | 1371 |
1369 matchedSuites = set() | 1372 matchedSuites = set() |
1370 numBench = [0] | 1373 numBench = [0] |