r181861 - Use 'env' in tests that set environment variables.

Jordan Rose jordan_rose at apple.com
Tue May 14 18:45:37 PDT 2013


Author: jrose
Date: Tue May 14 20:45:37 2013
New Revision: 181861

URL: http://llvm.org/viewvc/llvm-project?rev=181861&view=rev
Log:
Use 'env' in tests that set environment variables.

Patch by David Fang!

Modified:
    cfe/trunk/test/Tooling/auto-detect-from-source-parent-of-cwd.cpp
    cfe/trunk/test/Tooling/clang-check-pwd.cpp

Modified: cfe/trunk/test/Tooling/auto-detect-from-source-parent-of-cwd.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Tooling/auto-detect-from-source-parent-of-cwd.cpp?rev=181861&r1=181860&r2=181861&view=diff
==============================================================================
--- cfe/trunk/test/Tooling/auto-detect-from-source-parent-of-cwd.cpp (original)
+++ cfe/trunk/test/Tooling/auto-detect-from-source-parent-of-cwd.cpp Tue May 14 20:45:37 2013
@@ -2,7 +2,7 @@
 // RUN: mkdir -p %t/abc/def/ijk/qwe
 // RUN: echo "[{\"directory\":\".\",\"command\":\"clang++ -c %t/abc/def/ijk/qwe/test.cpp\",\"file\":\"%t/abc/def/ijk/qwe/test.cpp\"}]" | sed -e 's/\\/\\\\/g' > %t/compile_commands.json
 // RUN: cp "%s" "%t/abc/def/ijk/qwe/test.cpp"
-// RUN: PWD="%t/abc/def" clang-check "ijk/qwe/test.cpp" 2>&1 | FileCheck %s
+// RUN: env PWD="%t/abc/def" clang-check "ijk/qwe/test.cpp" 2>&1 | FileCheck %s
 
 // CHECK: C++ requires
 invalid;

Modified: cfe/trunk/test/Tooling/clang-check-pwd.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Tooling/clang-check-pwd.cpp?rev=181861&r1=181860&r2=181861&view=diff
==============================================================================
--- cfe/trunk/test/Tooling/clang-check-pwd.cpp (original)
+++ cfe/trunk/test/Tooling/clang-check-pwd.cpp Tue May 14 20:45:37 2013
@@ -2,7 +2,7 @@
 // RUN: mkdir %t
 // RUN: echo "[{\"directory\":\".\",\"command\":\"clang++ -c %t/test.cpp\",\"file\":\"%t/test.cpp\"}]" | sed -e 's/\\/\\\\/g' > %t/compile_commands.json
 // RUN: cp "%s" "%t/test.cpp"
-// RUN: PWD="%t" clang-check -p "%t" "test.cpp" 2>&1|FileCheck %s
+// RUN: env PWD="%t" clang-check -p "%t" "test.cpp" 2>&1|FileCheck %s
 // FIXME: Make the above easier.
 
 // CHECK: C++ requires





More information about the cfe-commits mailing list