Mercurial > hg > graal-compiler
comparison mx/mx_graal.py @ 21043:5ea65fe64368
Check distributions overlap in gate
author | Gilles Duboscq <gilles.m.duboscq@oracle.com> |
---|---|
date | Mon, 20 Apr 2015 18:27:46 +0200 |
parents | 12e94cba3696 |
children | 59632bb8e4ad |
comparison
equal
deleted
inserted
replaced
21042:38b39b75500c | 21043:5ea65fe64368 |
---|---|
1410 vmbuildsDefault = ','.join(_vmbuildChoices) | 1410 vmbuildsDefault = ','.join(_vmbuildChoices) |
1411 | 1411 |
1412 parser = ArgumentParser(prog='mx buildvms') | 1412 parser = ArgumentParser(prog='mx buildvms') |
1413 parser.add_argument('--vms', help='a comma separated list of VMs to build (default: ' + vmsDefault + ')', metavar='<args>', default=vmsDefault) | 1413 parser.add_argument('--vms', help='a comma separated list of VMs to build (default: ' + vmsDefault + ')', metavar='<args>', default=vmsDefault) |
1414 parser.add_argument('--builds', help='a comma separated list of build types (default: ' + vmbuildsDefault + ')', metavar='<args>', default=vmbuildsDefault) | 1414 parser.add_argument('--builds', help='a comma separated list of build types (default: ' + vmbuildsDefault + ')', metavar='<args>', default=vmbuildsDefault) |
1415 parser.add_argument('--check-distributions', action='store_true', dest='check_distributions', help='check built distributions for overlap') | |
1415 parser.add_argument('-n', '--no-check', action='store_true', help='omit running "java -version" after each build') | 1416 parser.add_argument('-n', '--no-check', action='store_true', help='omit running "java -version" after each build') |
1416 parser.add_argument('-c', '--console', action='store_true', help='send build output to console instead of log file') | 1417 parser.add_argument('-c', '--console', action='store_true', help='send build output to console instead of log file') |
1417 | 1418 |
1418 args = parser.parse_args(args) | 1419 args = parser.parse_args(args) |
1419 vms = args.vms.split(',') | 1420 vms = args.vms.split(',') |
1420 builds = args.builds.split(',') | 1421 builds = args.builds.split(',') |
1421 | 1422 |
1422 allStart = time.time() | 1423 allStart = time.time() |
1424 check_dists_args = ['--check-distributions'] if args.check_distributions else [] | |
1423 for v in vms: | 1425 for v in vms: |
1424 if not isVMSupported(v): | 1426 if not isVMSupported(v): |
1425 mx.log('The ' + v + ' VM is not supported on this platform - skipping') | 1427 mx.log('The ' + v + ' VM is not supported on this platform - skipping') |
1426 continue | 1428 continue |
1427 | 1429 |
1433 log = open(join(_graal_home, logFile), 'wb') | 1435 log = open(join(_graal_home, logFile), 'wb') |
1434 start = time.time() | 1436 start = time.time() |
1435 mx.log('BEGIN: ' + v + '-' + vmbuild + '\t(see: ' + logFile + ')') | 1437 mx.log('BEGIN: ' + v + '-' + vmbuild + '\t(see: ' + logFile + ')') |
1436 verbose = ['-v'] if mx._opts.verbose else [] | 1438 verbose = ['-v'] if mx._opts.verbose else [] |
1437 # Run as subprocess so that output can be directed to a file | 1439 # Run as subprocess so that output can be directed to a file |
1438 cmd = [sys.executable, '-u', join('mxtool', 'mx.py')] + verbose + ['--vm', v, '--vmbuild', vmbuild, 'build'] | 1440 cmd = [sys.executable, '-u', join('mxtool', 'mx.py')] + verbose + ['--vm', v, '--vmbuild', vmbuild, 'build'] + check_dists_args |
1439 mx.logv("executing command: " + str(cmd)) | 1441 mx.logv("executing command: " + str(cmd)) |
1440 subprocess.check_call(cmd, cwd=_graal_home, stdout=log, stderr=subprocess.STDOUT) | 1442 subprocess.check_call(cmd, cwd=_graal_home, stdout=log, stderr=subprocess.STDOUT) |
1441 duration = datetime.timedelta(seconds=time.time() - start) | 1443 duration = datetime.timedelta(seconds=time.time() - start) |
1442 mx.log('END: ' + v + '-' + vmbuild + '\t[' + str(duration) + ']') | 1444 mx.log('END: ' + v + '-' + vmbuild + '\t[' + str(duration) + ']') |
1443 else: | 1445 else: |
1444 with VM(v, vmbuild): | 1446 with VM(v, vmbuild): |
1445 build([]) | 1447 build(check_dists_args) |
1446 if not args.no_check: | 1448 if not args.no_check: |
1447 vmargs = ['-version'] | 1449 vmargs = ['-version'] |
1448 if v == 'graal': | 1450 if v == 'graal': |
1449 vmargs.insert(0, '-XX:-BootstrapGraal') | 1451 vmargs.insert(0, '-XX:-BootstrapGraal') |
1450 vm(vmargs, vm=v, vmbuild=vmbuild) | 1452 vm(vmargs, vm=v, vmbuild=vmbuild) |
1523 vm(vmargs) | 1525 vm(vmargs) |
1524 | 1526 |
1525 def _basic_gate_body(args, tasks): | 1527 def _basic_gate_body(args, tasks): |
1526 # Build server-hosted-graal now so we can run the unit tests | 1528 # Build server-hosted-graal now so we can run the unit tests |
1527 with Task('BuildHotSpotGraalHosted: product', tasks) as t: | 1529 with Task('BuildHotSpotGraalHosted: product', tasks) as t: |
1528 if t: buildvms(['--vms', 'server', '--builds', 'product']) | 1530 if t: buildvms(['--vms', 'server', '--builds', 'product', '--check-distributions']) |
1529 | 1531 |
1530 # Run unit tests on server-hosted-graal | 1532 # Run unit tests on server-hosted-graal |
1531 with VM('server', 'product'): | 1533 with VM('server', 'product'): |
1532 with Task('UnitTests:hosted-product', tasks) as t: | 1534 with Task('UnitTests:hosted-product', tasks) as t: |
1533 if t: unittest(['--enable-timing', '--verbose', '--fail-fast']) | 1535 if t: unittest(['--enable-timing', '--verbose', '--fail-fast']) |
1537 with Task('CTW:hosted-product', tasks) as t: | 1539 with Task('CTW:hosted-product', tasks) as t: |
1538 if t: ctw(['--ctwopts', '-Inline +ExitVMOnException', '-esa', '-G:+CompileTheWorldMultiThreaded', '-G:-CompileTheWorldVerbose']) | 1540 if t: ctw(['--ctwopts', '-Inline +ExitVMOnException', '-esa', '-G:+CompileTheWorldMultiThreaded', '-G:-CompileTheWorldVerbose']) |
1539 | 1541 |
1540 # Build the other VM flavors | 1542 # Build the other VM flavors |
1541 with Task('BuildHotSpotGraalOthers: fastdebug,product', tasks) as t: | 1543 with Task('BuildHotSpotGraalOthers: fastdebug,product', tasks) as t: |
1542 if t: buildvms(['--vms', 'graal,server', '--builds', 'fastdebug,product']) | 1544 if t: buildvms(['--vms', 'graal,server', '--builds', 'fastdebug,product', '--check-distributions']) |
1543 | 1545 |
1544 with VM('graal', 'fastdebug'): | 1546 with VM('graal', 'fastdebug'): |
1545 with Task('BootstrapWithSystemAssertions:fastdebug', tasks) as t: | 1547 with Task('BootstrapWithSystemAssertions:fastdebug', tasks) as t: |
1546 if t: vm(['-esa', '-XX:-TieredCompilation', '-version']) | 1548 if t: vm(['-esa', '-XX:-TieredCompilation', '-version']) |
1547 | 1549 |