[clang] [llvm-lit] Use lit Syntax for Environment Variables in Clang subproject (PR #102647)
Paul Kirth via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 9 11:30:16 PDT 2024
================
@@ -87,12 +87,13 @@
/// <default-triple>-gcc has lowest priority so <triple>-gcc
/// on PATH beats default triple in program path
-// RUN: DEFAULT_TRIPLE=`%t/clang --version | grep "Target:" | cut -d ' ' -f2`
-// RUN: touch %t/$DEFAULT_TRIPLE-gcc && chmod +x %t/$DEFAULT_TRIPLE-gcc
-// RUN: touch %t/%target_triple-gcc && chmod +x %t/%target_triple-gcc
-// RUN: env "PATH=%t/env/" %t/clang -### -target notreal-none-elf %s 2>&1 | \
-// RUN: FileCheck --check-prefix=DEFAULT_TRIPLE_GCC %s
-// DEFAULT_TRIPLE_GCC: env/notreal-none-elf-gcc"
+// RUN: %clang --version | grep "Target:" | cut -d ' ' -f2 > %t/default-triple.txt
+// RUN: env DEFAULT_TRIPLE=%{readfile:%t/default-triple.txt}
+// RUN: touch %t/%{env:DEFAULT_TRIPLE}-gcc && chmod +x %t/%{env:DEFAULT_TRIPLE}-gcc
+// RUN: touch %t/%target_triple-gcc && chmod +x %t/%target_triple-gcc &&
+// RUN: env "PATH=%t:$PATH" %t/clang -### -target notreal-none-elf %s 2>&1 | \
----------------
ilovepi wrote:
Why is `PATH` set differently?
https://github.com/llvm/llvm-project/pull/102647
More information about the cfe-commits
mailing list