Mercurial > hg > truffle
comparison mx/commands.py @ 9803:8e33b4ebfef1
add isGraalEnabled(vm) function in commands.py
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Thu, 23 May 2013 13:14:08 +0200 |
parents | 1ef7b26e9177 |
children | 6fa4b4933892 |
comparison
equal
deleted
inserted
replaced
9802:9dcd6f8a843b | 9803:8e33b4ebfef1 |
---|---|
823 os.close(_) | 823 os.close(_) |
824 | 824 |
825 def harness(projectscp, vmArgs): | 825 def harness(projectscp, vmArgs): |
826 if not exists(javaClass) or getmtime(javaClass) < getmtime(javaSource): | 826 if not exists(javaClass) or getmtime(javaClass) < getmtime(javaSource): |
827 subprocess.check_call([mx.java().javac, '-cp', projectscp, '-d', mxdir, javaSource]) | 827 subprocess.check_call([mx.java().javac, '-cp', projectscp, '-d', mxdir, javaSource]) |
828 if _vm == 'original' or _vm.endswith('nograal'): | 828 if not isGraalEnabled(_vm): |
829 prefixArgs = ['-esa', '-ea'] | 829 prefixArgs = ['-esa', '-ea'] |
830 else: | 830 else: |
831 prefixArgs = ['-XX:-BootstrapGraal', '-esa', '-ea'] | 831 prefixArgs = ['-XX:-BootstrapGraal', '-esa', '-ea'] |
832 vm(prefixArgs + vmArgs + ['-cp', projectscp + os.pathsep + mxdir, name] + [testfile]) | 832 vm(prefixArgs + vmArgs + ['-cp', projectscp + os.pathsep + mxdir, name] + [testfile]) |
833 | 833 |
1331 out = args[0] | 1331 out = args[0] |
1332 elif len(args) > 1: | 1332 elif len(args) > 1: |
1333 mx.abort('jacocoreport takes only one argument : an output directory') | 1333 mx.abort('jacocoreport takes only one argument : an output directory') |
1334 mx.run_java(['-jar', jacocoreport.get_path(True), '-in', 'jacoco.exec', '-g', join(_graal_home, 'graal'), out]) | 1334 mx.run_java(['-jar', jacocoreport.get_path(True), '-in', 'jacoco.exec', '-g', join(_graal_home, 'graal'), out]) |
1335 | 1335 |
1336 def isGraalEnabled(vm): | |
1337 return vm != 'original' and not vm.endswith('nograal') | |
1338 | |
1336 def site(args): | 1339 def site(args): |
1337 """create a website containing javadoc and the project dependency graph""" | 1340 """create a website containing javadoc and the project dependency graph""" |
1338 | 1341 |
1339 return mx.site(['--name', 'Graal', | 1342 return mx.site(['--name', 'Graal', |
1340 '--jd', '@-tag', '--jd', '@test:X', | 1343 '--jd', '@-tag', '--jd', '@test:X', |