Author: Aiden Grossman
Date: 2025-09-22T05:22:02Z
New Revision: 4efbbe1d35fe2666225b2989ea80d3af4d827f84

URL: 
https://github.com/llvm/llvm-project/commit/4efbbe1d35fe2666225b2989ea80d3af4d827f84
DIFF: 
https://github.com/llvm/llvm-project/commit/4efbbe1d35fe2666225b2989ea80d3af4d827f84.diff

LOG: [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.

Added: 
    

Modified: 
    clang/test/Driver/env.c

Removed: 
    


################################################################################
diff  --git a/clang/test/Driver/env.c b/clang/test/Driver/env.c
index 68ded45385702..399b89090eb86 100644
--- a/clang/test/Driver/env.c
+++ b/clang/test/Driver/env.c
@@ -1,14 +1,14 @@
 // Some assertions in this test use Linux style (/) file paths.
 // UNSUPPORTED: system-windows
-// RUN: bash -c env | grep LD_LIBRARY_PATH | tr -d '\n' > /tmp/ld_library_path
+// RUN: bash -c env | grep LD_LIBRARY_PATH | tr -d '\n' > %t.ld_library_path
 // The PATH variable is heavily used when trying to find a linker.
-// RUN: env -i LC_ALL=C LD_LIBRARY_PATH="%{readfile:/tmp/ld_library_path}" 
CLANG_NO_DEFAULT_CONFIG=1 \
+// RUN: env -i LC_ALL=C LD_LIBRARY_PATH="%{readfile:%t.ld_library_path}" 
CLANG_NO_DEFAULT_CONFIG=1 \
 // RUN:   %clang %s -### -o %t.o --target=i386-unknown-linux \
 // RUN:     --sysroot=%S/Inputs/basic_linux_tree \
 // RUN:     --rtlib=platform --unwindlib=platform -no-pie \
 // RUN:     2>&1 | FileCheck --check-prefix=CHECK-LD-32 %s
 //
-// RUN: env -i LC_ALL=C PATH="" 
LD_LIBRARY_PATH="%{readfile:/tmp/ld_library_path}" CLANG_NO_DEFAULT_CONFIG=1 \
+// RUN: env -i LC_ALL=C PATH="" 
LD_LIBRARY_PATH="%{readfile:%t.ld_library_path}" CLANG_NO_DEFAULT_CONFIG=1 \
 // RUN:   %clang %s -### -o %t.o --target=i386-unknown-linux \
 // RUN:     --sysroot=%S/Inputs/basic_linux_tree \
 // RUN:     --rtlib=platform --unwindlib=platform -no-pie \


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to