diff options
Diffstat (limited to 'utils/C++Tests')
-rw-r--r-- | utils/C++Tests/Clang-Code-Compile/lit.local.cfg | 2 | ||||
-rw-r--r-- | utils/C++Tests/Clang-Syntax/lit.local.cfg | 1 | ||||
-rw-r--r-- | utils/C++Tests/LLVM-Code-Compile/lit.local.cfg | 24 | ||||
-rw-r--r-- | utils/C++Tests/LLVM-Code-Syntax/lit.local.cfg | 23 | ||||
-rw-r--r-- | utils/C++Tests/LLVM-Syntax/lit.local.cfg | 3 | ||||
-rw-r--r-- | utils/C++Tests/lit.cfg | 12 |
6 files changed, 55 insertions, 10 deletions
diff --git a/utils/C++Tests/Clang-Code-Compile/lit.local.cfg b/utils/C++Tests/Clang-Code-Compile/lit.local.cfg index d9e39e5..59d3466 100644 --- a/utils/C++Tests/Clang-Code-Compile/lit.local.cfg +++ b/utils/C++Tests/Clang-Code-Compile/lit.local.cfg @@ -18,7 +18,7 @@ cxxflags = ['-D__STDC_LIMIT_MACROS', '-I%s/tools/clang/include' % root.llvm_src_root, '-I%s/tools/clang/include' % root.llvm_obj_root] config.test_format = \ - lit.formats.OneCommandPerFileTest(command=[root.clang, '-c', + lit.formats.OneCommandPerFileTest(command=[root.clang, '-emit-llvm', '-c', '-o', '/dev/null'] + cxxflags, dir='%s/tools/clang/lib' % root.llvm_src_root, recursive=True, diff --git a/utils/C++Tests/Clang-Syntax/lit.local.cfg b/utils/C++Tests/Clang-Syntax/lit.local.cfg index 280d1c1..89fdd8e 100644 --- a/utils/C++Tests/Clang-Syntax/lit.local.cfg +++ b/utils/C++Tests/Clang-Syntax/lit.local.cfg @@ -17,6 +17,7 @@ config.test_format = lit.formats.SyntaxCheckTest(compiler=root.clang, extra_cxx_args=['-D__STDC_LIMIT_MACROS', '-D__STDC_CONSTANT_MACROS', '-Wno-sign-compare', + '-Werror', '-I%s/include' % root.llvm_src_root, '-I%s/include' % root.llvm_obj_root, '-I%s/tools/clang/include' % root.llvm_src_root, diff --git a/utils/C++Tests/LLVM-Code-Compile/lit.local.cfg b/utils/C++Tests/LLVM-Code-Compile/lit.local.cfg new file mode 100644 index 0000000..fc493e4 --- /dev/null +++ b/utils/C++Tests/LLVM-Code-Compile/lit.local.cfg @@ -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)$') + diff --git a/utils/C++Tests/LLVM-Code-Syntax/lit.local.cfg b/utils/C++Tests/LLVM-Code-Syntax/lit.local.cfg new file mode 100644 index 0000000..67bc5aed --- /dev/null +++ b/utils/C++Tests/LLVM-Code-Syntax/lit.local.cfg @@ -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)$') diff --git a/utils/C++Tests/LLVM-Syntax/lit.local.cfg b/utils/C++Tests/LLVM-Syntax/lit.local.cfg index 25728bc..b67bb90 100644 --- a/utils/C++Tests/LLVM-Syntax/lit.local.cfg +++ b/utils/C++Tests/LLVM-Syntax/lit.local.cfg @@ -17,8 +17,9 @@ config.test_format = lit.formats.SyntaxCheckTest(compiler=root.clang, extra_cxx_args=['-D__STDC_LIMIT_MACROS', '-D__STDC_CONSTANT_MACROS', '-Wno-sign-compare', + '-Werror', '-I%s/include' % root.llvm_src_root, '-I%s/include' % root.llvm_obj_root]) config.excludes = ['AbstractTypeUser.h', 'DAGISelHeader.h', - 'AIXDataTypesFix.h', 'Solaris.h'] + 'AIXDataTypesFix.h', 'LinkAllPasses.h', 'Solaris.h'] diff --git a/utils/C++Tests/lit.cfg b/utils/C++Tests/lit.cfg index aa3b09d..e61502b 100644 --- a/utils/C++Tests/lit.cfg +++ b/utils/C++Tests/lit.cfg @@ -17,14 +17,10 @@ config.suffixes = [] # Reset these from the Clang config. config.test_source_root = config.test_exec_root = None -# Don't run Clang checks by default. +# Don't run Clang and LLVM code checks by default. config.excludes = [] -if (not lit.params.get('run_clang_syntax') and - not lit.params.get('run_clang_all')): - config.excludes.append('Clang-Syntax') -if (not lit.params.get('run_clang_code_syntax') and - not lit.params.get('run_clang_all')): +if not lit.params.get('run_clang_all'): config.excludes.append('Clang-Code-Syntax') -if (not lit.params.get('run_clang_compile') and - not lit.params.get('run_clang_all')): config.excludes.append('Clang-Code-Compile') + config.excludes.append('LLVM-Code-Syntax') + config.excludes.append('LLVM-Code-Compile') |