# HG changeset patch # User Gilles Duboscq # Date 1343317629 -7200 # Node ID 191e08da4de43cc918263ed94017a648ea1eaf4f # Parent 0e54d9bb922d2980cac7456a7e561ee28c48066c Apply jacoco coverage to all gate tests diff -r 0e54d9bb922d -r 191e08da4de4 mx/commands.py --- a/mx/commands.py Thu Jul 26 17:08:54 2012 +0200 +++ b/mx/commands.py Thu Jul 26 17:47:09 2012 +0200 @@ -586,7 +586,8 @@ 'append' : 'true' if _jacoco == 'append' else 'false', 'bootclasspath' : 'true', 'includes' : 'com.oracle.*', - 'excludes' : ':'.join(excludes) + 'excludes' : ':'.join(excludes), + 'destfile' : 'jacoco.exec' } args = ['-javaagent:' + jacocoagent.get_path(True) + '=' + ','.join([k + '=' + v for k, v in agentOptions.items()])] + args exe = join(jdk, 'bin', mx.exe_suffix('java')) @@ -710,7 +711,7 @@ global _vmbuild global _vm global _jacoco - + tasks = [] total = Task('Gate') try: @@ -727,34 +728,34 @@ t = Task('BuildJava') build(['--no-native']) tasks.append(t.stop()) + + if exists('jacoco.exec'): + os.unlink('jacoco.exec') + + if args.jacocout is not None: + _jacoco = 'append' + else: + _jacoco = 'off' + for vmbuild in ['fastdebug', 'product']: _vmbuild = vmbuild t = Task('BuildHotSpotGraal:' + vmbuild) buildvms(['--vms', 'graal', '--builds', vmbuild]) tasks.append(t.stop()) - + t = Task('BootstrapWithSystemAssertions:' + vmbuild) vm(['-esa', '-version']) tasks.append(t.stop()) - if vmbuild == 'product' and args.jacocout is not None: - _jacoco = 'on' - t = Task('UnitTests:' + vmbuild) unittest([]) tasks.append(t.stop()) - if vmbuild == 'product' and args.jacocout is not None: - _jacoco = 'append' - t = Task('JavaTesterTests:' + vmbuild) jtt(['@-XX:CompileCommand=exclude,*::run*'] if vmbuild == 'product' else []) tasks.append(t.stop()) - if vmbuild == 'product' and args.jacocout is not None: - _jacoco = 'off' - for test in sanitycheck.getDacapos(level=sanitycheck.SanityCheckLevel.Gate, gateBuildLevel=vmbuild): t = Task(str(test) + ':' + vmbuild) if not test.test('graal'): @@ -763,6 +764,8 @@ if args.jacocout is not None: jacocoreport([args.jacocout]) + + _jacoco = 'off' t = Task('BootstrapWithDeoptALot') vm(['-XX:+DeoptimizeALot', '-XX:+VerifyOops', '-version'], vmbuild='fastdebug')