clang/test: Introduce the feature "staticanalyzer" for --enable-clang-static-analyzer.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 16 Jul 2014 12:05:45 +0000 (12:05 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 16 Jul 2014 12:05:45 +0000 (12:05 +0000)
llvm-svn: 213140

clang/test/Coverage/html-diagnostics.c
clang/test/Tooling/lit.local.cfg [new file with mode: 0644]
clang/test/lit.cfg

index 410ee2a..c7489f8 100644 (file)
@@ -2,6 +2,8 @@
 // RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o %t %s
 // RUN: cat %t/*.html | FileCheck %s
 
+// REQUIRES: staticanalyzer
+
 // Because of the glob (*.html)
 // REQUIRES: shell
 
diff --git a/clang/test/Tooling/lit.local.cfg b/clang/test/Tooling/lit.local.cfg
new file mode 100644 (file)
index 0000000..da2a68b
--- /dev/null
@@ -0,0 +1,2 @@
+if config.root.clang_staticanalyzer == 0:
+    config.unsupported = True
index 11e8e0b..b5c5628 100644 (file)
@@ -334,6 +334,10 @@ for pattern in [r"\bFileCheck\b",
 
 # Set available features we allow tests to conditionalize on.
 #
+# Enabled/disabled features
+if config.clang_staticanalyzer != 0:
+    config.available_features.add("staticanalyzer")
+
 # As of 2011.08, crash-recovery tests still do not pass on FreeBSD.
 if platform.system() not in ['FreeBSD']:
     config.available_features.add('crash-recovery')