# HG changeset patch # User Gilles Duboscq # Date 1363026091 -3600 # Node ID 74896b25297a2964c9ee5bff8f4126d04e301463 # Parent c64ecb1ef1a9d90303abf6f75caaf110450accb3 Test canonicalization and checkstyle early in gate process Run the unittests in hosted mode (server) diff -r c64ecb1ef1a9 -r 74896b25297a mx/commands.py --- a/mx/commands.py Mon Mar 11 18:41:46 2013 +0100 +++ b/mx/commands.py Mon Mar 11 19:21:31 2013 +0100 @@ -784,11 +784,22 @@ if mx.eclipseformat(['-e', eclipse_exe]) != 0: t.abort('Formatter modified files - run "mx eclipseformat", check in changes and repush') tasks.append(t.stop()) + + t = Task('Canonicalization Check') + mx.log(time.strftime('%d %b %Y %H:%M:%S - Ensuring mx/projects files are canonicalized...')) + if mx.canonicalizeprojects([]) != 0: + t.abort('Rerun "mx canonicalizeprojects" and check-in the modified mx/projects files.') + tasks.append(t.stop()) t = Task('BuildJava') build(['--no-native', '--jdt-warning-as-error']) tasks.append(t.stop()) + t = Task('Checkstyle') + if mx.checkstyle([]) != 0: + t.abort('Checkstyle warnings were found') + tasks.append(t.stop()) + if exists('jacoco.exec'): os.unlink('jacoco.exec') @@ -796,10 +807,9 @@ _jacoco = 'append' else: _jacoco = 'off' - t = Task('BuildHotSpotGraal: fastdebug,product') - buildvms(['--vms', 'graal', '--builds', 'fastdebug,product']) + buildvms(['--vms', 'graal,server', '--builds', 'fastdebug,product']) tasks.append(t.stop()) _vmbuild = 'fastdebug' @@ -808,9 +818,12 @@ tasks.append(t.stop()) _vmbuild = 'product' - t = Task('UnitTests:product') + originalVm = _vm + _vm = 'server' # hosted mode + t = Task('UnitTests:hosted-product') unittest([]) tasks.append(t.stop()) + _vm = originalVm for vmbuild in ['fastdebug', 'product']: for test in sanitycheck.getDacapos(level=sanitycheck.SanityCheckLevel.Gate, gateBuildLevel=vmbuild): @@ -824,17 +837,6 @@ _jacoco = 'off' - t = Task('Checkstyle') - if mx.checkstyle([]) != 0: - t.abort('Checkstyle warnings were found') - tasks.append(t.stop()) - - t = Task('Canonicalization Check') - mx.log(time.strftime('%d %b %Y %H:%M:%S - Ensuring mx/projects files are canonicalized...')) - if mx.canonicalizeprojects([]) != 0: - t.abort('Rerun "mx canonicalizeprojects" and check-in the modified mx/projects files.') - tasks.append(t.stop()) - t = Task('CleanAndBuildGraalVisualizer') mx.run(['ant', '-f', join(_graal_home, 'visualizer', 'build.xml'), '-q', 'clean', 'build']) tasks.append(t.stop())