Mercurial > hg > truffle
changeset 4630:ef0ff914c10f
Make it possible to pass jvm args in jtt and unittest
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Fri, 17 Feb 2012 14:47:48 +0100 |
parents | 29da09bf4930 |
children | b1b78a46b907 |
files | mx/commands.py |
diffstat | 1 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mx/commands.py Fri Feb 17 13:54:39 2012 +0100 +++ b/mx/commands.py Fri Feb 17 14:47:48 2012 +0100 @@ -509,10 +509,11 @@ If filters are supplied, only tests whose fully qualified name include a filter as a substring are run. Negative filters are - those with a '-' prefix.""" + those with a '-' prefix. VM args should have a @ prefix.""" - pos = [a for a in args if a[0] != '-'] + pos = [a for a in args if a[0] != '-' and a[0] != '@' ] neg = [a[1:] for a in args if a[0] == '-'] + vmArgs = [a[1:] for a in args if a[0] == '@'] def containsAny(c, substrings): for s in substrings: @@ -531,17 +532,18 @@ if len(neg) != 0: classes = [c for c in classes if not containsAny(c, neg)] - vm(['-XX:-BootstrapGraal', '-esa', '-cp', mx.classpath(proj), 'org.junit.runner.JUnitCore'] + classes) + vm(['-XX:-BootstrapGraal', '-esa'] + vmArgs + ['-cp', mx.classpath(proj), 'org.junit.runner.JUnitCore'] + classes) def jtt(args): """run the Java Tester Tests in the GraalVM If filters are supplied, only tests whose fully qualified name include a filter as a substring are run. Negative filters are - those with a '-' prefix.""" + those with a '-' prefix. VM args should have a @ prefix.""" - pos = [a for a in args if a[0] != '-'] + pos = [a for a in args if a[0] != '-' and a[0] != '@' ] neg = [a[1:] for a in args if a[0] == '-'] + vmArgs = [a[1:] for a in args if a[0] == '@'] def containsAny(c, substrings): for s in substrings: @@ -560,7 +562,7 @@ if len(neg) != 0: classes = [c for c in classes if not containsAny(c, neg)] - vm(['-XX:-BootstrapGraal', '-XX:CompileOnly=::test', '-Xcomp', '-esa', '-cp', mx.classpath(proj), 'org.junit.runner.JUnitCore'] + classes) + vm(['-XX:-BootstrapGraal', '-XX:CompileOnly=::test', '-Xcomp', '-esa'] + vmArgs + ['-cp', mx.classpath(proj), 'org.junit.runner.JUnitCore'] + classes) def buildvms(args): """build one or more VMs in various configurations"""