From 8e19f98930f80162a8d0924dd2531ab622548bc4 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Wed, 16 Jul 2014 12:05:45 +0000 Subject: [PATCH] clang/test: Introduce the feature "staticanalyzer" for --enable-clang-static-analyzer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213140 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Coverage/html-diagnostics.c | 2 ++ test/Tooling/lit.local.cfg | 2 ++ test/lit.cfg | 4 ++++ 3 files changed, 8 insertions(+) create mode 100644 test/Tooling/lit.local.cfg diff --git a/test/Coverage/html-diagnostics.c b/test/Coverage/html-diagnostics.c index 410ee2acd5..c7489f82dd 100644 --- a/test/Coverage/html-diagnostics.c +++ b/test/Coverage/html-diagnostics.c @@ -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/test/Tooling/lit.local.cfg b/test/Tooling/lit.local.cfg new file mode 100644 index 0000000000..da2a68b378 --- /dev/null +++ b/test/Tooling/lit.local.cfg @@ -0,0 +1,2 @@ +if config.root.clang_staticanalyzer == 0: + config.unsupported = True diff --git a/test/lit.cfg b/test/lit.cfg index 11e8e0b142..b5c5628a58 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -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') -- 2.50.1