[llvm-commits] [dragonegg] r151976 - in /dragonegg/trunk/test: DEFormats.py DETestRunner.py compilator/dragonegg-lit.cfg
Duncan Sands
baldrick at free.fr
Sat Mar 3 05:30:06 PST 2012
Author: baldrick
Date: Sat Mar 3 07:30:06 2012
New Revision: 151976
URL: http://llvm.org/viewvc/llvm-project?rev=151976&view=rev
Log:
Ensure that -fuse-boehm-gc is used when compiling Java. Otherwise the java
front-end will crash on all non-trivial java files, causing all tests to pass.
Modified:
dragonegg/trunk/test/DEFormats.py
dragonegg/trunk/test/DETestRunner.py
dragonegg/trunk/test/compilator/dragonegg-lit.cfg
Modified: dragonegg/trunk/test/DEFormats.py
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/test/DEFormats.py?rev=151976&r1=151975&r2=151976&view=diff
==============================================================================
--- dragonegg/trunk/test/DEFormats.py (original)
+++ dragonegg/trunk/test/DEFormats.py Sat Mar 3 07:30:06 2012
@@ -2,12 +2,14 @@
from TestFormats import FileBasedTest
class CompilatorTest(FileBasedTest):
- def __init__(self, compilers, compiler_flags, skip, xfails):
+ def __init__(self, compilers, compiler_flags, suffix_flags, skip, xfails):
self.compilers = compilers
self.compiler_flags = compiler_flags
+ self.suffix_flags = suffix_flags
self.skip = skip
self.xfails = xfails
def execute(self, test, litConfig):
return DETestRunner.executeCompilatorTest(test, litConfig,
- self.compilers, self.compiler_flags, self.skip, self.xfails)
+ self.compilers, self.compiler_flags, self.suffix_flags, self.skip,
+ self.xfails)
Modified: dragonegg/trunk/test/DETestRunner.py
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/test/DETestRunner.py?rev=151976&r1=151975&r2=151976&view=diff
==============================================================================
--- dragonegg/trunk/test/DETestRunner.py (original)
+++ dragonegg/trunk/test/DETestRunner.py Sat Mar 3 07:30:06 2012
@@ -48,7 +48,8 @@
return (Test.FAIL, output.getvalue())
-def executeCompilatorTest(test, litConfig, compilers, flags, skip, xfails):
+def executeCompilatorTest(test, litConfig, compilers, flags, suffix_flags,
+ skip, xfails):
test_path = '/'.join(test.path_in_suite)
# Skip this test if requested to do so.
@@ -65,8 +66,15 @@
# Is this test expected to fail?
isXFail = test_path in xfails
- # Compile the test.
+ # The file should be compiled to assembler.
common_args = ['-S', test.getSourcePath()]
+
+ # Add any file specific flags.
+ srcbase,srcext = os.path.splitext(test.getSourcePath())
+ if srcext in suffix_flags:
+ common_args += suffix_flags[srcext]
+
+ # Compile the test.
for args in flags:
result,output = compareCommands(compilers, common_args + args, tmpDir)
if result != Test.PASS:
Modified: dragonegg/trunk/test/compilator/dragonegg-lit.cfg
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/test/compilator/dragonegg-lit.cfg?rev=151976&r1=151975&r2=151976&view=diff
==============================================================================
--- dragonegg/trunk/test/compilator/dragonegg-lit.cfg (original)
+++ dragonegg/trunk/test/compilator/dragonegg-lit.cfg Sat Mar 3 07:30:06 2012
@@ -26,6 +26,11 @@
'.mm', # ObjC++
]
+config.suffix_flags = {
+ '.jar' : ['-fuse-boehm-gc'], # Otherwise gcc crashes
+ '.class' : ['-fuse-boehm-gc'] # Otherwise gcc crashes
+}
+
config.compilers = [
[config.gcc_executable],
[config.gcc_executable, '-fplugin=' + config.dragonegg_plugin]
@@ -354,4 +359,4 @@
# testFormat: The test format to use to interpret tests.
config.test_format = DEFormats.CompilatorTest(config.compilers,
- config.compiler_flags, config.skip, config.xfails)
+ config.compiler_flags, config.suffix_flags, config.skip, config.xfails)
More information about the llvm-commits
mailing list