[compiler-rt] 291b8ce - [XRay] Make Test Work with Internal Shell
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 30 12:30:50 PDT 2025
Author: Aiden Grossman
Date: 2025-10-30T12:30:47-07:00
New Revision: 291b8ce40d0de8f876ab3791740b98dff5961a93
URL: https://github.com/llvm/llvm-project/commit/291b8ce40d0de8f876ab3791740b98dff5961a93
DIFF: https://github.com/llvm/llvm-project/commit/291b8ce40d0de8f876ab3791740b98dff5961a93.diff
LOG: [XRay] Make Test Work with Internal Shell
There was one test that set an environment variable without using env
and also used a subshell. These are features the internal shell does not
support. Rewrite the test to use readfile/env.
Reviewers: fmayer, MaskRay
Reviewed By: fmayer
Pull Request: https://github.com/llvm/llvm-project/pull/165143
Added:
Modified:
compiler-rt/test/xray/TestCases/Posix/fdr-single-thread.cpp
Removed:
################################################################################
diff --git a/compiler-rt/test/xray/TestCases/Posix/fdr-single-thread.cpp b/compiler-rt/test/xray/TestCases/Posix/fdr-single-thread.cpp
index b8803aedc8851..36a4e65988f9a 100644
--- a/compiler-rt/test/xray/TestCases/Posix/fdr-single-thread.cpp
+++ b/compiler-rt/test/xray/TestCases/Posix/fdr-single-thread.cpp
@@ -1,11 +1,12 @@
// RUN: %clangxx_xray -g -std=c++11 %s -o %t
// RUN: rm -f fdr-logging-1thr-*
-// RUN: XRAY_OPTIONS=XRAY_OPTIONS="verbosity=1 patch_premain=true \
+// RUN: env XRAY_OPTIONS=XRAY_OPTIONS="verbosity=1 patch_premain=true \
// RUN: xray_fdr_log=true \
// RUN: xray_fdr_log_func_duration_threshold_us=0 \
// RUN: xray_logfile_base=fdr-logging-1thr-" %run %t 2>&1
+// RUN: ls fdr-logging-1thr-* | head -n1 | tr -d '\n' > %t.xray_input
// RUN: %llvm_xray convert --output-format=yaml --symbolize --instr_map=%t \
-// RUN: "`ls fdr-logging-1thr-* | head -n1`" | FileCheck %s
+// RUN: "%{readfile:%t.xray_input}" | FileCheck %s
// RUN: rm fdr-logging-1thr-*
// UNSUPPORTED: target=arm{{.*}}
More information about the llvm-commits
mailing list