[llvm-branch-commits] [lit] Expand late substitutions before running builtins (PR #165140)

James Henderson via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Oct 30 09:15:19 PDT 2025


================
@@ -0,0 +1,6 @@
+## Tests that readfile works with the env builtin.
+# RUN: echo -n "hello" > %t.1
+# RUN: env TEST=%{readfile:%t.1} python3 -c "import os; print(os.environ['TEST'])"
----------------
jh7370 wrote:

Is the %python substitution available within the lit tests? I'd be marginally concerned about the portability of this (I'm sure I've seen cases where the python3 executable doesn't exist, but python in general does, but I don't recall the details).

https://github.com/llvm/llvm-project/pull/165140


More information about the llvm-branch-commits mailing list