Mercurial > hg > graal-jvmci-8
comparison mx/commands.py @ 11227:bd0e589a9a65
avoid use of JUnitWrapper when exactly one test is being executed
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 06 Aug 2013 18:10:44 +0200 |
parents | e36f7e4af7bf |
children | 2e38c55153e5 |
comparison
equal
deleted
inserted
replaced
11226:422b0e9b9aed | 11227:bd0e589a9a65 |
---|---|
761 subprocess.check_call([mx.java().javac, '-cp', projectscp, '-d', mxdir, javaSource]) | 761 subprocess.check_call([mx.java().javac, '-cp', projectscp, '-d', mxdir, javaSource]) |
762 if not isGraalEnabled(_vm): | 762 if not isGraalEnabled(_vm): |
763 prefixArgs = ['-esa', '-ea'] | 763 prefixArgs = ['-esa', '-ea'] |
764 else: | 764 else: |
765 prefixArgs = ['-XX:-BootstrapGraal', '-esa', '-ea'] | 765 prefixArgs = ['-XX:-BootstrapGraal', '-esa', '-ea'] |
766 vm(prefixArgs + vmArgs + ['-cp', projectscp + os.pathsep + mxdir, name] + [testfile]) | 766 with open(testfile) as fp: |
767 testclasses = [l.rstrip() for l in fp.readlines()] | |
768 if len(testclasses) == 1: | |
769 # Execute Junit directly when one test is being run. This simplifies | |
770 # replaying the VM execution in a native debugger (e.g., gdb). | |
771 vm(prefixArgs + vmArgs + ['-cp', projectscp, 'org.junit.runner.JUnitCore'] + testclasses) | |
772 else: | |
773 vm(prefixArgs + vmArgs + ['-cp', projectscp + os.pathsep + mxdir, name] + [testfile]) | |
767 | 774 |
768 try: | 775 try: |
769 _run_tests(args, harness, annotations, testfile) | 776 _run_tests(args, harness, annotations, testfile) |
770 finally: | 777 finally: |
771 if os.environ.get('MX_TESTFILE') is None: | 778 if os.environ.get('MX_TESTFILE') is None: |