Author: dgregor
Date: Wed Nov 25 20:28:53 2009
New Revision: 89923

URL: http://llvm.org/viewvc/llvm-project?rev=89923&view=rev
Log:
Add C++ tests to try to parse and compile the LLVM libraries

Added:
    cfe/trunk/utils/C++Tests/LLVM-Code-Compile/
    cfe/trunk/utils/C++Tests/LLVM-Code-Compile/lit.local.cfg
    cfe/trunk/utils/C++Tests/LLVM-Code-Syntax/
    cfe/trunk/utils/C++Tests/LLVM-Code-Syntax/lit.local.cfg

Added: cfe/trunk/utils/C++Tests/LLVM-Code-Compile/lit.local.cfg
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/C%2B%2BTests/LLVM-Code-Compile/lit.local.cfg?rev=89923&view=auto

==============================================================================
--- cfe/trunk/utils/C++Tests/LLVM-Code-Compile/lit.local.cfg (added)
+++ cfe/trunk/utils/C++Tests/LLVM-Code-Compile/lit.local.cfg Wed Nov 25 
20:28:53 2009
@@ -0,0 +1,24 @@
+# -*- Python -*-
+
+# Configuration file for the 'lit' test runner.
+
+def getRoot(config):
+    if not config.parent:
+        return config
+    return getRoot(config.parent)
+
+root = getRoot(config)
+
+# testFormat: The test format to use to interpret tests.
+cxxflags = ['-D__STDC_LIMIT_MACROS',
+            '-D__STDC_CONSTANT_MACROS',
+            '-Wno-sign-compare',
+            '-I%s/include' % root.llvm_src_root,
+            '-I%s/include' % root.llvm_obj_root]
+config.test_format = \
+  lit.formats.OneCommandPerFileTest(command=[root.clang, '-emit-llvm', '-c',
+                                             '-o', '/dev/null'] + cxxflags,
+                                    dir='%s/lib' % root.llvm_src_root,
+                                    recursive=True,
+                                    pattern='^(.*\\.cpp)$')
+

Added: cfe/trunk/utils/C++Tests/LLVM-Code-Syntax/lit.local.cfg
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/C%2B%2BTests/LLVM-Code-Syntax/lit.local.cfg?rev=89923&view=auto

==============================================================================
--- cfe/trunk/utils/C++Tests/LLVM-Code-Syntax/lit.local.cfg (added)
+++ cfe/trunk/utils/C++Tests/LLVM-Code-Syntax/lit.local.cfg Wed Nov 25 20:28:53 
2009
@@ -0,0 +1,23 @@
+# -*- Python -*-
+
+# Configuration file for the 'lit' test runner.
+
+def getRoot(config):
+    if not config.parent:
+        return config
+    return getRoot(config.parent)
+
+root = getRoot(config)
+
+# testFormat: The test format to use to interpret tests.
+cxxflags = ['-D__STDC_LIMIT_MACROS',
+            '-D__STDC_CONSTANT_MACROS',
+            '-Wno-sign-compare',
+            '-I%s/include' % root.llvm_src_root,
+            '-I%s/include' % root.llvm_obj_root]
+config.test_format = \
+  lit.formats.OneCommandPerFileTest(command=[root.clang,
+                                             '-fsyntax-only'] + cxxflags,
+                                    dir='%s/lib' % root.llvm_src_root,
+                                    recursive=True,
+                                    pattern='^(.*\\.cpp)$')


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to