Mercurial > hg > truffle
comparison mx/commands.py @ 7313:570d8e4c6dfb
Merge.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 07 Jan 2013 13:04:04 +0100 |
parents | 57edf6b07d36 |
children | dd903cdfe708 |
comparison
equal
deleted
inserted
replaced
7312:46f945023189 | 7313:570d8e4c6dfb |
---|---|
394 stdin = p.stdin | 394 stdin = p.stdin |
395 if logFile: | 395 if logFile: |
396 log = open(logFile, 'w') | 396 log = open(logFile, 'w') |
397 ret = False | 397 ret = False |
398 while True: | 398 while True: |
399 line = stdout.readline().decode(sys.stdout.encoding) | 399 |
400 # encoding may be None on windows plattforms | |
401 if sys.stdout.encoding is None: | |
402 encoding = 'utf-8' | |
403 else: | |
404 encoding = sys.stdout.encoding | |
405 | |
406 line = stdout.readline().decode(encoding) | |
400 if logFile: | 407 if logFile: |
401 log.write(line.encode('utf-8')) | 408 log.write(line.encode('utf-8')) |
402 line = line.strip() | 409 line = line.strip() |
403 mx.log(line) | 410 mx.log(line) |
404 if line == STARTTOKEN: | 411 if line == STARTTOKEN: |
1066 out = args[0] | 1073 out = args[0] |
1067 elif len(args) > 1: | 1074 elif len(args) > 1: |
1068 mx.abort('jacocoreport takes only one argument : an output directory') | 1075 mx.abort('jacocoreport takes only one argument : an output directory') |
1069 mx.run_java(['-jar', jacocoreport.get_path(True), '-in', 'jacoco.exec', '-g', join(_graal_home, 'graal'), out]) | 1076 mx.run_java(['-jar', jacocoreport.get_path(True), '-in', 'jacoco.exec', '-g', join(_graal_home, 'graal'), out]) |
1070 | 1077 |
1078 def jar(args): | |
1079 parser = ArgumentParser(prog='mx jar'); | |
1080 parser.add_argument('projects', nargs=REMAINDER, metavar='projects...') | |
1081 args = parser.parse_args(args) | |
1082 | |
1083 if not args.projects: | |
1084 mx.abort('Please specify at least one project to jar.') | |
1085 | |
1086 for pname in args.projects: | |
1087 p = mx.project(pname, fatalIfMissing=True) | |
1088 outputDir = p.output_dir() | |
1089 targetJar = join(p.dir, p.name + '.jar') | |
1090 mx.jar(targetJar, [outputDir]) | |
1091 | |
1071 def site(args): | 1092 def site(args): |
1072 """create a website containing javadoc and the project dependency graph""" | 1093 """create a website containing javadoc and the project dependency graph""" |
1073 | 1094 |
1074 return mx.site(['--name', 'Graal', | 1095 return mx.site(['--name', 'Graal', |
1075 '--jd', '@-tag', '--jd', '@test:X', | 1096 '--jd', '@-tag', '--jd', '@test:X', |
1092 'igv' : [igv, ''], | 1113 'igv' : [igv, ''], |
1093 'jdkhome': [jdkhome, ''], | 1114 'jdkhome': [jdkhome, ''], |
1094 'dacapo': [dacapo, '[[n] benchmark] [VM options|@DaCapo options]'], | 1115 'dacapo': [dacapo, '[[n] benchmark] [VM options|@DaCapo options]'], |
1095 'scaladacapo': [scaladacapo, '[[n] benchmark] [VM options|@Scala DaCapo options]'], | 1116 'scaladacapo': [scaladacapo, '[[n] benchmark] [VM options|@Scala DaCapo options]'], |
1096 'specjvm2008': [specjvm2008, '[VM options|@specjvm2008 options]'], | 1117 'specjvm2008': [specjvm2008, '[VM options|@specjvm2008 options]'], |
1118 'jar': [jar, '[-options]'], | |
1097 #'example': [example, '[-v] example names...'], | 1119 #'example': [example, '[-v] example names...'], |
1098 'gate' : [gate, '[-options]'], | 1120 'gate' : [gate, '[-options]'], |
1099 'gv' : [gv, ''], | 1121 'gv' : [gv, ''], |
1100 'bench' : [bench, '[-resultfile file] [all(default)|dacapo|specjvm2008|bootstrap]'], | 1122 'bench' : [bench, '[-resultfile file] [all(default)|dacapo|specjvm2008|bootstrap]'], |
1101 'unittest' : [unittest, '[filters...]'], | 1123 'unittest' : [unittest, '[filters...]'], |