Mercurial > hg > graal-compiler
comparison mx/commands.py @ 4601:ade18666f2be
Added --omit-native-build to gate command so that native cleaning and building can be omitted for changesets that made no changes to the C/C++ code.
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 16 Feb 2012 22:38:52 +0100 |
parents | 7e5d8d1c74a1 |
children | ebd98fc68b67 |
comparison
equal
deleted
inserted
replaced
4584:7e5d8d1c74a1 | 4601:ade18666f2be |
---|---|
578 self.duration = datetime.timedelta(seconds=self.end - self.start) | 578 self.duration = datetime.timedelta(seconds=self.end - self.start) |
579 mx.log(time.strftime('gate: %d %b %Y %H:%M:%S: ABORT: ') + self.title + ' [' + str(self.duration) + ']') | 579 mx.log(time.strftime('gate: %d %b %Y %H:%M:%S: ABORT: ') + self.title + ' [' + str(self.duration) + ']') |
580 mx.abort(codeOrMessage) | 580 mx.abort(codeOrMessage) |
581 return self | 581 return self |
582 | 582 |
583 parser = ArgumentParser(prog='mx gate'); | |
584 parser.add_argument('--omit-native-build', action='store_false', dest='buildNative', help='omit cleaning and building native code') | |
585 | |
586 args = parser.parse_args(args) | |
587 | |
583 tasks = [] | 588 tasks = [] |
584 total = Task('Gate') | 589 total = Task('Gate') |
585 try: | 590 try: |
586 | 591 |
587 t = Task('Clean') | 592 t = Task('Clean') |
588 clean([]) | 593 clean([] if args.buildNative else ['--no-native']) |
589 tasks.append(t.stop()) | 594 tasks.append(t.stop()) |
590 | 595 |
591 t = Task('Checkstyle') | 596 t = Task('Checkstyle') |
592 if mx.checkstyle([]) != 0: | 597 if mx.checkstyle([]) != 0: |
593 t.abort('Checkstyle warnings were found') | 598 t.abort('Checkstyle warnings were found') |
606 t = Task('CleanAndBuildGraalVisualizer') | 611 t = Task('CleanAndBuildGraalVisualizer') |
607 mx.run(['ant', '-f', join(_graal_home, 'visualizer', 'build.xml'), '-q', 'clean', 'build']) | 612 mx.run(['ant', '-f', join(_graal_home, 'visualizer', 'build.xml'), '-q', 'clean', 'build']) |
608 tasks.append(t.stop()) | 613 tasks.append(t.stop()) |
609 | 614 |
610 # Prevent Graal modifications from breaking the standard builds | 615 # Prevent Graal modifications from breaking the standard builds |
611 t = Task('BuildHotSpotVarieties') | 616 if args.buildNative: |
612 buildvms(['--vms', 'client,server', '--builds', 'fastdebug,product']) | 617 t = Task('BuildHotSpotVarieties') |
613 tasks.append(t.stop()) | 618 buildvms(['--vms', 'client,server', '--builds', 'fastdebug,product']) |
619 tasks.append(t.stop()) | |
614 | 620 |
615 for vmbuild in ['fastdebug', 'product']: | 621 for vmbuild in ['fastdebug', 'product']: |
616 global _vmbuild | 622 global _vmbuild |
617 _vmbuild = vmbuild | 623 _vmbuild = vmbuild |
618 | 624 |
619 t = Task('BuildHotSpotGraal:' + vmbuild) | 625 if args.buildNative: |
620 buildvms(['--vms', 'graal', '--builds', vmbuild]) | 626 t = Task('BuildHotSpotGraal:' + vmbuild) |
621 tasks.append(t.stop()) | 627 buildvms(['--vms', 'graal', '--builds', vmbuild]) |
628 tasks.append(t.stop()) | |
622 | 629 |
623 t = Task('BootstrapWithSystemAssertions:' + vmbuild) | 630 t = Task('BootstrapWithSystemAssertions:' + vmbuild) |
624 vm(['-esa', '-version']) | 631 vm(['-esa', '-version']) |
625 tasks.append(t.stop()) | 632 tasks.append(t.stop()) |
626 | 633 |
757 | 764 |
758 def mx_init(): | 765 def mx_init(): |
759 _vmbuild = 'product' | 766 _vmbuild = 'product' |
760 commands = { | 767 commands = { |
761 'build': [build, '[-options]'], | 768 'build': [build, '[-options]'], |
762 'buildvms': [buildvms, ''], | 769 'buildvms': [buildvms, '[-options]'], |
763 'clean': [clean, ''], | 770 'clean': [clean, ''], |
764 'copyrightcheck': [copyrightcheck, ''], | 771 'copyrightcheck': [copyrightcheck, ''], |
765 'hsdis': [hsdis, '[att]'], | 772 'hsdis': [hsdis, '[att]'], |
766 'dacapo': [dacapo, '[[n] benchmark] [VM options|@DaCapo options]'], | 773 'dacapo': [dacapo, '[[n] benchmark] [VM options|@DaCapo options]'], |
767 'scaladacapo': [scaladacapo, '[[n] benchmark] [VM options|@Scala DaCapo options]'], | 774 'scaladacapo': [scaladacapo, '[[n] benchmark] [VM options|@Scala DaCapo options]'], |
768 'specjvm2008': [specjvm2008, '[VM options|@specjvm2008 options]'], | 775 'specjvm2008': [specjvm2008, '[VM options|@specjvm2008 options]'], |
769 'example': [example, '[-v] example names...'], | 776 'example': [example, '[-v] example names...'], |
770 'gate' : [gate, ''], | 777 'gate' : [gate, '[-options]'], |
771 'gv' : [gv, ''], | 778 'gv' : [gv, ''], |
772 'bench' : [bench, '[-resultfile file] [all(default)|dacapo|specjvm2008|bootstrap]'], | 779 'bench' : [bench, '[-resultfile file] [all(default)|dacapo|specjvm2008|bootstrap]'], |
773 'unittest' : [unittest, '[filters...]'], | 780 'unittest' : [unittest, '[filters...]'], |
774 'vm': [vm, '[-options] class [args...]'] | 781 'vm': [vm, '[-options] class [args...]'] |
775 } | 782 } |