Skip to content

Commit

Permalink
Check for backtraces in tests which are verifying pretty stack traces…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
cooperp committed Feb 10, 2015
1 parent baa701f commit d50b79d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion test/Analysis/crash-trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
3 changes: 2 additions & 1 deletion test/Parser/crash-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions test/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
1 change: 1 addition & 0 deletions test/lit.site.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d50b79d

Please sign in to comment.