diff options
author | Michal Gorny <mgorny@gentoo.org> | 2017-08-29 05:58:08 +0000 |
---|---|---|
committer | Michal Gorny <mgorny@gentoo.org> | 2017-08-29 05:58:08 +0000 |
commit | a81de445c187ed9d0bbfb52a78a8de21b596fd44 (patch) | |
tree | 60ef691a735e8f8fc6a93716a64e0207b3d3ba7f /clang-tools-extra/CMakeLists.txt | |
parent | f2e017b0830c25ee6ab22bcf11ad9eed91056c17 (diff) | |
download | llvm-a81de445c187ed9d0bbfb52a78a8de21b596fd44.tar.gz |
[cmake] Support running extra clang tool tests without static analyzer
Support running the extra clang tool tests when the static analyzer
is disabled. Disable the relevant clang-tidy tests and one include-fixer
test that require it to work.
Previously, the tests were disabled entirely with
CLANG_ENABLE_STATIC_ANALYZER being false. Now, the tests are being
enabled and the relevant tests are excluded and marked unsupported
appropriately.
In order to disable clang-tidy tests, the whole test directory is added
to the exclude lists, to avoid having to explicitly add 'REQUIRES' line
to every single test. If the other solution is preferable, I can update
the patch.
The yamldb_plugin include-fixer test is also updated to be disabled
without static analyzer. It fails in that case because clang is not
outputting a replacement suggestion -- but I don't know the exact
reason why it does not do that.
Differential Revision: https://reviews.llvm.org/D37188
llvm-svn: 311983
Diffstat (limited to 'clang-tools-extra/CMakeLists.txt')
-rw-r--r-- | clang-tools-extra/CMakeLists.txt | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang-tools-extra/CMakeLists.txt b/clang-tools-extra/CMakeLists.txt index ac8f16ba4fcd..760340a63379 100644 --- a/clang-tools-extra/CMakeLists.txt +++ b/clang-tools-extra/CMakeLists.txt @@ -15,8 +15,7 @@ add_subdirectory(pp-trace) add_subdirectory(tool-template) # Add the common testsuite after all the tools. -# TODO: Support tests with more granularity when features are off? -if(CLANG_ENABLE_STATIC_ANALYZER AND CLANG_INCLUDE_TESTS) +if(CLANG_INCLUDE_TESTS) add_subdirectory(test) add_subdirectory(unittests) endif() |