Mercurial > hg > truffle
comparison mx/mx_graal.py @ 15228:bc21a3b4d6d3
mx: show output of JMH build failure
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 18 Apr 2014 13:39:53 +0200 |
parents | 06bfcf5f941d |
children | 5c9185d42a3a |
comparison
equal
deleted
inserted
replaced
15227:7be43cbf3568 | 15228:bc21a3b4d6d3 |
---|---|
1471 mx.log("Need to rebuild JMH due to change in JMH directory tree indicated by this diff:") | 1471 mx.log("Need to rebuild JMH due to change in JMH directory tree indicated by this diff:") |
1472 mx.log('\n'.join(diff)) | 1472 mx.log('\n'.join(diff)) |
1473 buildJmh = True | 1473 buildJmh = True |
1474 | 1474 |
1475 if buildJmh: | 1475 if buildJmh: |
1476 def _blackhole(x): | 1476 buildOutput = [] |
1477 mx.logv(x[:-1]) | 1477 def _redirect(x): |
1478 if mx._opts.verbose: | |
1479 mx.log(x[:-1]) | |
1480 else: | |
1481 buildOutput.append(x) | |
1478 env = os.environ.copy() | 1482 env = os.environ.copy() |
1479 env['JAVA_HOME'] = _jdk(vmToCheck='graal') | 1483 env['JAVA_HOME'] = _jdk(vmToCheck='graal') |
1480 env['MAVEN_OPTS'] = '-graal' | 1484 env['MAVEN_OPTS'] = '-graal' |
1481 mx.log("Building benchmarks...") | 1485 mx.log("Building benchmarks...") |
1482 mx.run(['mvn', 'package'], cwd=jmhPath, out=_blackhole, env=env) | 1486 retcode = mx.run(['mvn', 'package'], cwd=jmhPath, out=_redirect, env=env, nonZeroIsFatal=False) |
1487 if retcode != 0: | |
1488 mx.log(''.join(buildOutput)) | |
1489 mx.abort(retcode) | |
1483 timestamp.touch() | 1490 timestamp.touch() |
1484 with open(timestamp.path, 'w') as fp: | 1491 with open(timestamp.path, 'w') as fp: |
1485 fp.write('\n'.join(jmhTree)) | 1492 fp.write('\n'.join(jmhTree)) |
1486 | 1493 |
1487 matchedSuites = set() | 1494 matchedSuites = set() |