Skip to content

Commit 4efbbe1

Browse files
[Clang] Make env.c test use proper file substitutions
I left accesses to /tmp in the patch from my debugging and never switched them over to proper lit substitutions to ensure that everything is isolated.
1 parent 84a796d commit 4efbbe1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/test/Driver/env.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// Some assertions in this test use Linux style (/) file paths.
22
// UNSUPPORTED: system-windows
3-
// RUN: bash -c env | grep LD_LIBRARY_PATH | tr -d '\n' > /tmp/ld_library_path
3+
// RUN: bash -c env | grep LD_LIBRARY_PATH | tr -d '\n' > %t.ld_library_path
44
// The PATH variable is heavily used when trying to find a linker.
5-
// RUN: env -i LC_ALL=C LD_LIBRARY_PATH="%{readfile:/tmp/ld_library_path}" CLANG_NO_DEFAULT_CONFIG=1 \
5+
// RUN: env -i LC_ALL=C LD_LIBRARY_PATH="%{readfile:%t.ld_library_path}" CLANG_NO_DEFAULT_CONFIG=1 \
66
// RUN: %clang %s -### -o %t.o --target=i386-unknown-linux \
77
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
88
// RUN: --rtlib=platform --unwindlib=platform -no-pie \
99
// RUN: 2>&1 | FileCheck --check-prefix=CHECK-LD-32 %s
1010
//
11-
// RUN: env -i LC_ALL=C PATH="" LD_LIBRARY_PATH="%{readfile:/tmp/ld_library_path}" CLANG_NO_DEFAULT_CONFIG=1 \
11+
// RUN: env -i LC_ALL=C PATH="" LD_LIBRARY_PATH="%{readfile:%t.ld_library_path}" CLANG_NO_DEFAULT_CONFIG=1 \
1212
// RUN: %clang %s -### -o %t.o --target=i386-unknown-linux \
1313
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
1414
// RUN: --rtlib=platform --unwindlib=platform -no-pie \

0 commit comments

Comments
 (0)