# HG changeset patch # User Gilles Duboscq # Date 1329486468 -3600 # Node ID ef0ff914c10ffd2ed71d4ffa6aa26db250f96283 # Parent 29da09bf4930d44ba2fd4197f5ffff0931f4f38f Make it possible to pass jvm args in jtt and unittest diff -r 29da09bf4930 -r ef0ff914c10f mx/commands.py --- 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"""