[llvm-commits] [dragonegg] r151988 - /dragonegg/trunk/test/DETestRunner.py

Duncan Sands baldrick at free.fr
Sat Mar 3 13:51:42 PST 2012


Author: baldrick
Date: Sat Mar  3 15:51:42 2012
New Revision: 151988

URL: http://llvm.org/viewvc/llvm-project?rev=151988&view=rev
Log:
Compile with "-I source_dir" in case there are useful headers there.
Uniformize name style a bit while there.

Modified:
    dragonegg/trunk/test/DETestRunner.py

Modified: dragonegg/trunk/test/DETestRunner.py
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/test/DETestRunner.py?rev=151988&r1=151987&r2=151988&view=diff
==============================================================================
--- dragonegg/trunk/test/DETestRunner.py (original)
+++ dragonegg/trunk/test/DETestRunner.py Sat Mar  3 15:51:42 2012
@@ -57,22 +57,27 @@
         return (Test.UNSUPPORTED, None)
 
     # Create the output directory if it does not already exist.
-    execpath = test.getExecPath()
-    execdir,execbase = os.path.split(execpath)
-    tmpDir = os.path.join(execdir, 'Output')
-    tmpDir = os.path.join(tmpDir, execbase)
+    execPath = test.getExecPath()
+    execDir,execBase = os.path.split(execPath)
+    tmpDir = os.path.join(execDir, 'Output')
+    tmpDir = os.path.join(tmpDir, execBase)
     Util.mkdir_p(tmpDir)
 
     # Is this test expected to fail?
     isXFail = test_path in xfails
 
     # The file should be compiled to assembler.
-    common_args = ['-S', test.getSourcePath()]
+    srcPath = test.getSourcePath();
+    common_args = ['-S', srcPath]
+
+    # Look for headers and such-like in the directory containing the source.
+    srcDir,srcBase = os.path.split(srcPath)
+    common_args += ['-I', srcDir]
 
     # Add any file specific flags.
-    srcbase,srcext = os.path.splitext(test.getSourcePath())
-    if srcext in suffix_flags:
-      common_args += suffix_flags[srcext]
+    srcBase,srcExt = os.path.splitext(srcPath)
+    if srcExt in suffix_flags:
+      common_args += suffix_flags[srcExt]
 
     # Compile the test.
     for args in flags:





More information about the llvm-commits mailing list