From d50b79df868e3402c3b4ae58f9d7d62605080a2b Mon Sep 17 00:00:00 2001 From: Pete Cooper Date: Tue, 10 Feb 2015 19:53:38 +0000 Subject: [PATCH] Check for backtraces in tests which are verifying pretty stack traces from a crashing clang. PrettyStackTrace now requires the ENABLE_BACKTRACES option. We need to check for that here or these tests fail llvm-lit. Reviewed by chandlerc git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@228735 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Analysis/crash-trace.c | 3 ++- test/Parser/crash-report.c | 3 ++- test/lit.cfg | 3 +++ test/lit.site.cfg.in | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/test/Analysis/crash-trace.c b/test/Analysis/crash-trace.c index 8b61b75172..5fca8d88c6 100644 --- a/test/Analysis/crash-trace.c +++ b/test/Analysis/crash-trace.c @@ -2,7 +2,8 @@ // REQUIRES: crash-recovery // FIXME: CHECKs might be incompatible to win32. -// REQUIRES: shell +// Stack traces also require back traces. +// REQUIRES: shell backtrace void clang_analyzer_crash(void); diff --git a/test/Parser/crash-report.c b/test/Parser/crash-report.c index 92bc9ba6db..840a2a593f 100644 --- a/test/Parser/crash-report.c +++ b/test/Parser/crash-report.c @@ -2,7 +2,8 @@ // REQUIRES: crash-recovery // FIXME: CHECKs might be incompatible to win32. -// REQUIRES: shell +// Stack traces also require back traces. +// REQUIRES: shell backtrace #prag\ ma clang __debug crash diff --git a/test/lit.cfg b/test/lit.cfg index 4200a4ae0d..51e1e4fdbc 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -464,6 +464,9 @@ if config.llvm_use_sanitizer == "Undefined": else: config.available_features.add("not_ubsan") +if config.enable_backtrace == "1": + config.available_features.add("backtrace") + # Check if we should run long running tests. if lit_config.params.get("run_long_tests", None) == "true": config.available_features.add("long_tests") diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in index 1f0b9600d6..332bcec148 100644 --- a/test/lit.site.cfg.in +++ b/test/lit.site.cfg.in @@ -18,6 +18,7 @@ config.clang_arcmt = @ENABLE_CLANG_ARCMT@ config.clang_staticanalyzer = @ENABLE_CLANG_STATIC_ANALYZER@ config.clang_examples = @ENABLE_CLANG_EXAMPLES@ config.enable_shared = @ENABLE_SHARED@ +config.enable_backtrace = "@ENABLE_BACKTRACES@" config.host_arch = "@HOST_ARCH@" # Support substitution of the tools and libs dirs with user parameters. This is -- 2.40.0