[compiler-rt] bb8261b - [MemProf] Make Test work with Internal Shell
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 30 12:47:17 PDT 2025
Author: Aiden Grossman
Date: 2025-10-30T12:47:14-07:00
New Revision: bb8261b7f3863350848751de9d5f3f52cf692962
URL: https://github.com/llvm/llvm-project/commit/bb8261b7f3863350848751de9d5f3f52cf692962
DIFF: https://github.com/llvm/llvm-project/commit/bb8261b7f3863350848751de9d5f3f52cf692962.diff
LOG: [MemProf] Make Test work with Internal Shell
There is one test that uses a subshell to generate a long path name.
Replace it with a python invocation and a readfile substitution. This
helps move compiler-rt over to lit's internal shell.
Reviewers: fmayer, snehasish, teresajohnson
Reviewed By: fmayer, teresajohnson
Pull Request: https://github.com/llvm/llvm-project/pull/165146
Added:
Modified:
compiler-rt/test/memprof/TestCases/log_path_test.cpp
Removed:
################################################################################
diff --git a/compiler-rt/test/memprof/TestCases/log_path_test.cpp b/compiler-rt/test/memprof/TestCases/log_path_test.cpp
index 664ab79393195..683ca67122c31 100644
--- a/compiler-rt/test/memprof/TestCases/log_path_test.cpp
+++ b/compiler-rt/test/memprof/TestCases/log_path_test.cpp
@@ -18,7 +18,8 @@
// RUN: %env_memprof_opts=print_text=true:log_path=/dev/null/INVALID not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-BAD-DIR --dump-input=always
// Too long log_path.
-// RUN: %env_memprof_opts=print_text=true:log_path=`for((i=0;i<10000;i++)); do echo -n $i; done` \
+// RUN: %python -c "for i in range(0, 10000): print(i, end='')" > %t.long_log_path
+// RUN: %env_memprof_opts=print_text=true:log_path=%{readfile:%t.long_log_path} \
// RUN: not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-LONG --dump-input=always
// Specifying the log name via the __memprof_profile_filename variable.
More information about the llvm-commits
mailing list