summaryrefslogtreecommitdiff
path: root/test/asan/TestCases/printf-4.c
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2015-08-12 23:50:12 +0000
committerReid Kleckner <rnk@google.com>2015-08-12 23:50:12 +0000
commit7e63eb3496ea36a31e56585f9c2d285abd1f5c91 (patch)
tree375b529b40e4e305251437c2eba3aa46116b2e4f /test/asan/TestCases/printf-4.c
parent02f8271b87663a1c4a623a25ea2e3acf5c04fbab (diff)
downloadcompiler-rt-7e63eb3496ea36a31e56585f9c2d285abd1f5c91.tar.gz
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@244839 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/asan/TestCases/printf-4.c')
-rw-r--r--test/asan/TestCases/printf-4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/asan/TestCases/printf-4.c b/test/asan/TestCases/printf-4.c
index b2a14ff4f..13bfc876c 100644
--- a/test/asan/TestCases/printf-4.c
+++ b/test/asan/TestCases/printf-4.c
@@ -1,8 +1,8 @@
// RUN: %clang_asan -O2 %s -o %t
// We need replace_str=0 and replace_intrin=0 to avoid reporting errors in
// strlen() and memcpy() called by puts().
-// RUN: env ASAN_OPTIONS=$ASAN_OPTIONS:replace_str=0:replace_intrin=0:check_printf=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
-// RUN: env ASAN_OPTIONS=$ASAN_OPTIONS:replace_str=0:replace_intrin=0 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
+// RUN: %env_asan_opts=replace_str=0:replace_intrin=0:check_printf=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
+// RUN: %env_asan_opts=replace_str=0:replace_intrin=0 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
// FIXME: printf is not intercepted on Windows yet.
// XFAIL: win32