[compiler-rt] 841d85f - [Profile] Rewrite Test to work with Internal Shell
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 30 12:46:05 PDT 2025
Author: Aiden Grossman
Date: 2025-10-30T12:46:01-07:00
New Revision: 841d85f6ee61b536405561bc263f360df2f385eb
URL: https://github.com/llvm/llvm-project/commit/841d85f6ee61b536405561bc263f360df2f385eb
DIFF: https://github.com/llvm/llvm-project/commit/841d85f6ee61b536405561bc263f360df2f385eb.diff
LOG: [Profile] Rewrite Test to work with Internal Shell
There was one test that used subshells to read a file. Replace those
subshells with the readfile substitution.
Reviewers: fmayer, mingmingl-llvm
Reviewed By: mingmingl-llvm, fmayer
Pull Request: https://github.com/llvm/llvm-project/pull/165145
Added:
Modified:
compiler-rt/test/profile/instrprof-hostname.c
Removed:
################################################################################
diff --git a/compiler-rt/test/profile/instrprof-hostname.c b/compiler-rt/test/profile/instrprof-hostname.c
index b77cf8df158bd..c0b3426eeaa84 100644
--- a/compiler-rt/test/profile/instrprof-hostname.c
+++ b/compiler-rt/test/profile/instrprof-hostname.c
@@ -1,7 +1,7 @@
// RUN: %clang_profgen -o %t -O3 %s
// RUN: env LLVM_PROFILE_FILE=%h.%t-%h.profraw_%h %run %t
-// RUN: %run uname -n > %t.n
-// RUN: llvm-profdata merge -o %t.profdata `cat %t.n`.%t-`cat %t.n`.profraw_`cat %t.n`
+// RUN: %run uname -n | tr -d '\n' > %t.n
+// RUN: llvm-profdata merge -o %t.profdata %{readfile:%t.n}.%t-%{readfile:%t.n}.profraw_%{readfile:%t.n}
// RUN: %clang_profuse=%t.profdata -o - -S -emit-llvm %s | FileCheck %s
// REQUIRES: shell
More information about the llvm-commits
mailing list