[compiler-rt] [compiler-rt][test] Move tmp dir creation with env to where dir is run (PR #106252)

via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 27 10:22:24 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-pgo

Author: Connie Zhu (connieyzhu)

<details>
<summary>Changes</summary>

The original test used env to set the LLVM_PROFILE_FILE variable, but because it does not have a subcommand, this is only temporary and does not propogate to the following RUN lines.

NOTE: the original patch DOES NOT work.

---
Full diff: https://github.com/llvm/llvm-project/pull/106252.diff


1 Files Affected:

- (modified) compiler-rt/test/profile/Linux/instrprof-dir.c (+1-2) 


``````````diff
diff --git a/compiler-rt/test/profile/Linux/instrprof-dir.c b/compiler-rt/test/profile/Linux/instrprof-dir.c
index 9d9af6daf51381..9e051167633ca6 100644
--- a/compiler-rt/test/profile/Linux/instrprof-dir.c
+++ b/compiler-rt/test/profile/Linux/instrprof-dir.c
@@ -1,7 +1,6 @@
 // RUN: %clang_pgogen -o %t %s
-// RUN: env LLVM_PROFILE_FILE="%t.d/%m.profraw"
 // RUN: rm -fr %t.d
-// RUN: %run %t %t.d
+// RUN: env LLVM_PROFILE_FILE="%t.d/%m.profraw" %run %t %t.d
 
 #include <errno.h>
 #include <unistd.h>

``````````

</details>


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


More information about the llvm-commits mailing list