Mercurial > hg > truffle
comparison mx/commands.py @ 5232:c005ca943790
added -j option to gate command to disable cleaning of Java class files
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 12 Apr 2012 14:20:51 +0200 |
parents | e91f0761c56d |
children | c1e5e3ab546d |
comparison
equal
deleted
inserted
replaced
5231:7564f0469116 | 5232:c005ca943790 |
---|---|
685 mx.log(time.strftime('gate: %d %b %Y %H:%M:%S: ABORT: ') + self.title + ' [' + str(self.duration) + ']') | 685 mx.log(time.strftime('gate: %d %b %Y %H:%M:%S: ABORT: ') + self.title + ' [' + str(self.duration) + ']') |
686 mx.abort(codeOrMessage) | 686 mx.abort(codeOrMessage) |
687 return self | 687 return self |
688 | 688 |
689 parser = ArgumentParser(prog='mx gate'); | 689 parser = ArgumentParser(prog='mx gate'); |
690 parser.add_argument('-j', '--omit-java-clean', action='store_false', dest='cleanJava', help='omit cleaning Java native code') | |
690 parser.add_argument('-n', '--omit-native-build', action='store_false', dest='buildNative', help='omit cleaning and building native code') | 691 parser.add_argument('-n', '--omit-native-build', action='store_false', dest='buildNative', help='omit cleaning and building native code') |
691 parser.add_argument('-g', '--only-build-graalvm', action='store_false', dest='buildNonGraal', help='only build the Graal VM') | 692 parser.add_argument('-g', '--only-build-graalvm', action='store_false', dest='buildNonGraal', help='only build the Graal VM') |
692 parser.add_argument('--jacocout', help='specify the output directory for jacoco report') | 693 parser.add_argument('--jacocout', help='specify the output directory for jacoco report') |
693 | 694 |
694 args = parser.parse_args(args) | 695 args = parser.parse_args(args) |
696 tasks = [] | 697 tasks = [] |
697 total = Task('Gate') | 698 total = Task('Gate') |
698 try: | 699 try: |
699 | 700 |
700 t = Task('Clean') | 701 t = Task('Clean') |
701 clean([] if args.buildNative else ['--no-native']) | 702 cleanArgs = [] |
703 if not args.buildNative: | |
704 cleanArgs.append('--no-native') | |
705 if not args.cleanJava: | |
706 cleanArgs.append('--no-java') | |
707 clean(cleanArgs) | |
702 tasks.append(t.stop()) | 708 tasks.append(t.stop()) |
703 | 709 |
704 t = Task('BuildJava') | 710 t = Task('BuildJava') |
705 build(['--no-native']) | 711 build(['--no-native']) |
706 tasks.append(t.stop()) | 712 tasks.append(t.stop()) |