Mercurial > hg > truffle
comparison mx/commands.py @ 5878:191e08da4de4
Apply jacoco coverage to all gate tests
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Thu, 26 Jul 2012 17:47:09 +0200 |
parents | 0e54d9bb922d |
children | 472a648769e4 |
comparison
equal
deleted
inserted
replaced
5877:0e54d9bb922d | 5878:191e08da4de4 |
---|---|
584 | 584 |
585 agentOptions = { | 585 agentOptions = { |
586 'append' : 'true' if _jacoco == 'append' else 'false', | 586 'append' : 'true' if _jacoco == 'append' else 'false', |
587 'bootclasspath' : 'true', | 587 'bootclasspath' : 'true', |
588 'includes' : 'com.oracle.*', | 588 'includes' : 'com.oracle.*', |
589 'excludes' : ':'.join(excludes) | 589 'excludes' : ':'.join(excludes), |
590 'destfile' : 'jacoco.exec' | |
590 } | 591 } |
591 args = ['-javaagent:' + jacocoagent.get_path(True) + '=' + ','.join([k + '=' + v for k, v in agentOptions.items()])] + args | 592 args = ['-javaagent:' + jacocoagent.get_path(True) + '=' + ','.join([k + '=' + v for k, v in agentOptions.items()])] + args |
592 exe = join(jdk, 'bin', mx.exe_suffix('java')) | 593 exe = join(jdk, 'bin', mx.exe_suffix('java')) |
593 dbg = _native_dbg.split() if _native_dbg is not None else [] | 594 dbg = _native_dbg.split() if _native_dbg is not None else [] |
594 return mx.run(dbg + [exe, '-' + vm] + args, nonZeroIsFatal=nonZeroIsFatal, out=out, err=err, cwd=cwd, timeout=timeout) | 595 return mx.run(dbg + [exe, '-' + vm] + args, nonZeroIsFatal=nonZeroIsFatal, out=out, err=err, cwd=cwd, timeout=timeout) |
708 args = parser.parse_args(args) | 709 args = parser.parse_args(args) |
709 | 710 |
710 global _vmbuild | 711 global _vmbuild |
711 global _vm | 712 global _vm |
712 global _jacoco | 713 global _jacoco |
713 | 714 |
714 tasks = [] | 715 tasks = [] |
715 total = Task('Gate') | 716 total = Task('Gate') |
716 try: | 717 try: |
717 | 718 |
718 t = Task('Clean') | 719 t = Task('Clean') |
725 tasks.append(t.stop()) | 726 tasks.append(t.stop()) |
726 | 727 |
727 t = Task('BuildJava') | 728 t = Task('BuildJava') |
728 build(['--no-native']) | 729 build(['--no-native']) |
729 tasks.append(t.stop()) | 730 tasks.append(t.stop()) |
731 | |
732 if exists('jacoco.exec'): | |
733 os.unlink('jacoco.exec') | |
734 | |
735 if args.jacocout is not None: | |
736 _jacoco = 'append' | |
737 else: | |
738 _jacoco = 'off' | |
739 | |
730 for vmbuild in ['fastdebug', 'product']: | 740 for vmbuild in ['fastdebug', 'product']: |
731 _vmbuild = vmbuild | 741 _vmbuild = vmbuild |
732 | 742 |
733 t = Task('BuildHotSpotGraal:' + vmbuild) | 743 t = Task('BuildHotSpotGraal:' + vmbuild) |
734 buildvms(['--vms', 'graal', '--builds', vmbuild]) | 744 buildvms(['--vms', 'graal', '--builds', vmbuild]) |
735 tasks.append(t.stop()) | 745 tasks.append(t.stop()) |
736 | 746 |
737 t = Task('BootstrapWithSystemAssertions:' + vmbuild) | 747 t = Task('BootstrapWithSystemAssertions:' + vmbuild) |
738 vm(['-esa', '-version']) | 748 vm(['-esa', '-version']) |
739 tasks.append(t.stop()) | 749 tasks.append(t.stop()) |
740 | 750 |
741 if vmbuild == 'product' and args.jacocout is not None: | |
742 _jacoco = 'on' | |
743 | |
744 t = Task('UnitTests:' + vmbuild) | 751 t = Task('UnitTests:' + vmbuild) |
745 unittest([]) | 752 unittest([]) |
746 tasks.append(t.stop()) | 753 tasks.append(t.stop()) |
747 | 754 |
748 if vmbuild == 'product' and args.jacocout is not None: | |
749 _jacoco = 'append' | |
750 | |
751 t = Task('JavaTesterTests:' + vmbuild) | 755 t = Task('JavaTesterTests:' + vmbuild) |
752 jtt(['@-XX:CompileCommand=exclude,*::run*'] if vmbuild == 'product' else []) | 756 jtt(['@-XX:CompileCommand=exclude,*::run*'] if vmbuild == 'product' else []) |
753 tasks.append(t.stop()) | 757 tasks.append(t.stop()) |
754 | |
755 if vmbuild == 'product' and args.jacocout is not None: | |
756 _jacoco = 'off' | |
757 | 758 |
758 for test in sanitycheck.getDacapos(level=sanitycheck.SanityCheckLevel.Gate, gateBuildLevel=vmbuild): | 759 for test in sanitycheck.getDacapos(level=sanitycheck.SanityCheckLevel.Gate, gateBuildLevel=vmbuild): |
759 t = Task(str(test) + ':' + vmbuild) | 760 t = Task(str(test) + ':' + vmbuild) |
760 if not test.test('graal'): | 761 if not test.test('graal'): |
761 t.abort(test.name + ' Failed') | 762 t.abort(test.name + ' Failed') |
762 tasks.append(t.stop()) | 763 tasks.append(t.stop()) |
763 | 764 |
764 if args.jacocout is not None: | 765 if args.jacocout is not None: |
765 jacocoreport([args.jacocout]) | 766 jacocoreport([args.jacocout]) |
767 | |
768 _jacoco = 'off' | |
766 | 769 |
767 t = Task('BootstrapWithDeoptALot') | 770 t = Task('BootstrapWithDeoptALot') |
768 vm(['-XX:+DeoptimizeALot', '-XX:+VerifyOops', '-version'], vmbuild='fastdebug') | 771 vm(['-XX:+DeoptimizeALot', '-XX:+VerifyOops', '-version'], vmbuild='fastdebug') |
769 tasks.append(t.stop()) | 772 tasks.append(t.stop()) |
770 | 773 |