Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit 431213c

Browse files
committed
[test] Enable the strace_test only if strace is installed
Differential Revision: https://reviews.llvm.org/D29628 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@294425 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 49779f4 commit 431213c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

test/lsan/TestCases/strace_test.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Test that lsan reports a proper error when running under strace.
2+
// REQUIRES: strace
23
// RUN: %clangxx_lsan %s -o %t
34
// RUN: not strace -o /dev/null %run %t 2>&1 | FileCheck %s
45

test/lsan/lit.common.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
import os
66

7+
import lit.util
8+
79
def get_required_attr(config, attr_name):
810
attr_value = getattr(config, attr_name, None)
911
if attr_value == None:
@@ -29,6 +31,9 @@ else:
2931
lit_config.fatal("Unknown LSan test mode: %r" % lsan_lit_test_mode)
3032
config.name += config.name_suffix
3133

34+
if lit.util.which('strace'):
35+
config.available_features.add('strace')
36+
3237
clang_cflags = ["-O0", config.target_cflags] + config.debug_info_flags
3338
clang_cxxflags = config.cxx_mode_flags + clang_cflags
3439
lsan_incdir = config.test_source_root + "/../"

0 commit comments

Comments
 (0)