Mercurial > hg > graal-compiler
diff mx/mx_graal.py @ 13323:093353894575
Test the Truffle JAR after building.
author | Chris Seaton <chris.seaton@oracle.com> |
---|---|
date | Fri, 13 Dec 2013 14:26:39 +0000 |
parents | 30e57b49fdb1 |
children | ecea358f97be |
line wrap: on
line diff
--- a/mx/mx_graal.py Fri Dec 13 13:54:13 2013 +0000 +++ b/mx/mx_graal.py Fri Dec 13 14:26:39 2013 +0000 @@ -808,7 +808,7 @@ f_testfile.close() harness(projectscp, vmArgs) -def _unittest(args, annotations): +def _unittest(args, annotations, prefixcp=""): mxdir = dirname(__file__) name = 'JUnitWrapper' javaSource = join(mxdir, name + '.java') @@ -830,9 +830,9 @@ if len(testclasses) == 1: # Execute Junit directly when one test is being run. This simplifies # replaying the VM execution in a native debugger (e.g., gdb). - vm(prefixArgs + vmArgs + ['-cp', projectscp, 'org.junit.runner.JUnitCore'] + testclasses) + vm(prefixArgs + vmArgs + ['-cp', prefixcp + projectscp, 'org.junit.runner.JUnitCore'] + testclasses) else: - vm(prefixArgs + vmArgs + ['-cp', projectscp + os.pathsep + mxdir, name] + [testfile]) + vm(prefixArgs + vmArgs + ['-cp', prefixcp + projectscp + os.pathsep + mxdir, name] + [testfile]) try: _run_tests(args, harness, annotations, testfile) @@ -1348,9 +1348,17 @@ def trufflejar(args=None): """make truffle.jar""" + + # Test with the built classes + _unittest(["com.oracle.truffle.api.test", "com.oracle.truffle.api.dsl.test"], ['@Test', '@LongTest', '@Parameters']) + # We use the DSL processor as the starting point for the classpath - this # therefore includes the DSL processor, the DSL and the API. packagejar(mx.classpath("com.oracle.truffle.dsl.processor").split(os.pathsep), "truffle.jar", None, "com.oracle.truffle.dsl.processor.TruffleProcessor") + + # Test with the JAR + _unittest(["com.oracle.truffle.api.test", "com.oracle.truffle.api.dsl.test"], ['@Test', '@LongTest', '@Parameters'], "truffle.jar:") + def isGraalEnabled(vm): return vm != 'original' and not vm.endswith('nograal')