diff options
author | Reid Kleckner <rnk@google.com> | 2015-08-12 23:50:12 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2015-08-12 23:50:12 +0000 |
commit | 85220d021878c4627f69752ff1c411d4f08320c0 (patch) | |
tree | 1666a4aa5ec9d49310c9022bfd44bf3c6d385ca8 /compiler-rt/test/asan/TestCases/Posix/gc-test.cc | |
parent | d7057d9e52dd8fa7d928a7097b0d34b581b74782 (diff) | |
download | bcm5719-llvm-85220d021878c4627f69752ff1c411d4f08320c0.tar.gz bcm5719-llvm-85220d021878c4627f69752ff1c411d4f08320c0.zip |
Use %env_asan_opts= substitution instead of 'env ASAN_OPTIONS=$ASAN_OPTIONS'
Summary:
The lit internal shell is used by default on Windows, and it does not
support bash variable expansion. Because bash variable expansion
interacts with tokenization, it is prohibitively difficult to make the
existing lit shell do general shell variable expansion.
The most common use of shell variables in the asan tests is to add
options to the default set of options set by lit.cfg. We can avoid the
need for variable expansion with a substitution that expands to 'env
ASAN_OPTIONS=<defaults:>'.
This has the side benefit of shortening the RUN lines, so it seemed
better than implementing limited variable expansion in lit.
Reviewers: samsonov, filcab
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11982
llvm-svn: 244839
Diffstat (limited to 'compiler-rt/test/asan/TestCases/Posix/gc-test.cc')
-rw-r--r-- | compiler-rt/test/asan/TestCases/Posix/gc-test.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler-rt/test/asan/TestCases/Posix/gc-test.cc b/compiler-rt/test/asan/TestCases/Posix/gc-test.cc index 3fedd6a68d3..56d8c398fc7 100644 --- a/compiler-rt/test/asan/TestCases/Posix/gc-test.cc +++ b/compiler-rt/test/asan/TestCases/Posix/gc-test.cc @@ -1,9 +1,9 @@ // RUN: %clangxx_asan %s -pthread -o %t -// RUN: env ASAN_OPTIONS=$ASAN_OPTIONS:detect_stack_use_after_return=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1 -// RUN: env ASAN_OPTIONS=$ASAN_OPTIONS:detect_stack_use_after_return=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK0 +// RUN: %env_asan_opts=detect_stack_use_after_return=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1 +// RUN: %env_asan_opts=detect_stack_use_after_return=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK0 // RUN: %clangxx_asan -O3 %s -pthread -o %t -// RUN: env ASAN_OPTIONS=$ASAN_OPTIONS:detect_stack_use_after_return=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1 -// RUN: env ASAN_OPTIONS=$ASAN_OPTIONS:detect_stack_use_after_return=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK0 +// RUN: %env_asan_opts=detect_stack_use_after_return=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1 +// RUN: %env_asan_opts=detect_stack_use_after_return=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK0 // REQUIRES: stable-runtime #include <assert.h> |