Mercurial > hg > truffle
comparison mx/mx_graal.py @ 15253:9ff9f6643986
mx: unconditionally ensure mx injected dependencies are up to date in buildjmh command
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Sat, 19 Apr 2014 12:48:19 +0200 |
parents | 4c68a0eb69ca |
children | 0c9406f9338f |
comparison
equal
deleted
inserted
replaced
15252:359c9bb2d2c8 | 15253:9ff9f6643986 |
---|---|
1447 if not mx.library(name, fatalIfMissing=False): | 1447 if not mx.library(name, fatalIfMissing=False): |
1448 mx.log('Skipping ' + groupId + '.' + artifactId + '.jar as ' + name + ' cannot be resolved') | 1448 mx.log('Skipping ' + groupId + '.' + artifactId + '.jar as ' + name + ' cannot be resolved') |
1449 return | 1449 return |
1450 d = mx.Distribution(graalSuite, name=artifactId, path=path, sourcesPath=path, deps=deps, excludedLibs=[]) | 1450 d = mx.Distribution(graalSuite, name=artifactId, path=path, sourcesPath=path, deps=deps, excludedLibs=[]) |
1451 d.make_archive() | 1451 d.make_archive() |
1452 cmd = ['mvn', '-q', 'install:install-file', '-DgroupId=' + groupId, '-DartifactId=' + artifactId, | 1452 cmd = ['mvn', 'install:install-file', '-DgroupId=' + groupId, '-DartifactId=' + artifactId, |
1453 '-Dversion=1.0-SNAPSHOT', '-Dpackaging=jar', '-Dfile=' + d.path] | 1453 '-Dversion=1.0-SNAPSHOT', '-Dpackaging=jar', '-Dfile=' + d.path] |
1454 if not mx._opts.verbose: | |
1455 cmd.append('-q') | |
1454 if args.settings: | 1456 if args.settings: |
1455 cmd = cmd + ['-s', args.settings] | 1457 cmd = cmd + ['-s', args.settings] |
1456 mx.run(cmd) | 1458 mx.run(cmd) |
1457 os.unlink(d.path) | 1459 os.unlink(d.path) |
1458 | 1460 |
1479 args = parser.parse_args(args) | 1481 args = parser.parse_args(args) |
1480 | 1482 |
1481 jmhPath = _get_jmh_path() | 1483 jmhPath = _get_jmh_path() |
1482 mx.log('JMH benchmarks: ' + jmhPath) | 1484 mx.log('JMH benchmarks: ' + jmhPath) |
1483 | 1485 |
1486 # Ensure the mx injected dependencies are up to date | |
1487 makejmhdeps(['-p'] + (['-s', args.settings] if args.settings else [])) | |
1488 | |
1484 timestamp = mx.TimeStampFile(join(_graal_home, 'mx', 'jmh', jmhPath.replace(os.sep, '_') + '.timestamp')) | 1489 timestamp = mx.TimeStampFile(join(_graal_home, 'mx', 'jmh', jmhPath.replace(os.sep, '_') + '.timestamp')) |
1485 mustBuild = args.clean | 1490 mustBuild = args.clean |
1486 if not mustBuild: | 1491 if not mustBuild: |
1487 try: | 1492 try: |
1488 hgfiles = [join(jmhPath, f) for f in subprocess.check_output(['hg', '-R', jmhPath, 'locate']).split('\n')] | 1493 hgfiles = [join(jmhPath, f) for f in subprocess.check_output(['hg', '-R', jmhPath, 'locate']).split('\n')] |
1500 buildOutput.append(x) | 1505 buildOutput.append(x) |
1501 env = os.environ.copy() | 1506 env = os.environ.copy() |
1502 env['JAVA_HOME'] = _jdk(vmToCheck='server') | 1507 env['JAVA_HOME'] = _jdk(vmToCheck='server') |
1503 env['MAVEN_OPTS'] = '-server' | 1508 env['MAVEN_OPTS'] = '-server' |
1504 mx.log("Building benchmarks...") | 1509 mx.log("Building benchmarks...") |
1505 makejmhdeps(['-p'] + (['-s', args.settings] if args.settings else [])) | |
1506 cmd = ['mvn'] | 1510 cmd = ['mvn'] |
1507 if args.settings: | 1511 if args.settings: |
1508 cmd = cmd + ['-s', args.settings] | 1512 cmd = cmd + ['-s', args.settings] |
1509 if args.clean: | 1513 if args.clean: |
1510 cmd.append('clean') | 1514 cmd.append('clean') |