aboutsummaryrefslogtreecommitdiff
path: root/compiler-rt/test/xray
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/test/xray')
-rw-r--r--compiler-rt/test/xray/TestCases/Posix/always-never-instrument.cpp2
-rw-r--r--compiler-rt/test/xray/TestCases/Posix/basic-filtering.cpp14
-rw-r--r--compiler-rt/test/xray/TestCases/Posix/basic-mode-dso.cpp5
-rw-r--r--compiler-rt/test/xray/TestCases/Posix/c-test.cpp2
-rw-r--r--compiler-rt/test/xray/TestCases/Posix/common-trampoline-alignment.cpp2
-rw-r--r--compiler-rt/test/xray/TestCases/Posix/custom-event-handler-alignment.cpp2
-rw-r--r--compiler-rt/test/xray/TestCases/Posix/custom-event-logging.cpp4
-rw-r--r--compiler-rt/test/xray/TestCases/Posix/default-options.cpp2
-rw-r--r--compiler-rt/test/xray/TestCases/Posix/fdr-mode-inmemory.cpp8
-rw-r--r--compiler-rt/test/xray/TestCases/Posix/fdr-mode-multiple.cpp8
-rw-r--r--compiler-rt/test/xray/TestCases/Posix/fdr-mode.cpp15
-rw-r--r--compiler-rt/test/xray/TestCases/Posix/fdr-single-thread.cpp5
-rw-r--r--compiler-rt/test/xray/TestCases/Posix/fdr-thread-order.cpp2
-rw-r--r--compiler-rt/test/xray/TestCases/Posix/fork_basic_logging.cpp5
-rw-r--r--compiler-rt/test/xray/TestCases/Posix/profiling-multi-threaded.cpp8
-rw-r--r--compiler-rt/test/xray/TestCases/Posix/profiling-single-threaded.cpp8
-rw-r--r--compiler-rt/test/xray/TestCases/Posix/quiet-start.cpp6
-rw-r--r--compiler-rt/test/xray/lit.site.cfg.py.in2
18 files changed, 57 insertions, 43 deletions
diff --git a/compiler-rt/test/xray/TestCases/Posix/always-never-instrument.cpp b/compiler-rt/test/xray/TestCases/Posix/always-never-instrument.cpp
index e5fefc07..85a3d23 100644
--- a/compiler-rt/test/xray/TestCases/Posix/always-never-instrument.cpp
+++ b/compiler-rt/test/xray/TestCases/Posix/always-never-instrument.cpp
@@ -12,6 +12,8 @@
// REQUIRES: built-in-llvm-tree
+// UNSUPPORTED: armhf-linux
+
// NOINSTR-NOT: {{.*__xray_NeverInstrumented.*}}
int __xray_NeverInstrumented() {
return 0;
diff --git a/compiler-rt/test/xray/TestCases/Posix/basic-filtering.cpp b/compiler-rt/test/xray/TestCases/Posix/basic-filtering.cpp
index 1440460..1d03efc 100644
--- a/compiler-rt/test/xray/TestCases/Posix/basic-filtering.cpp
+++ b/compiler-rt/test/xray/TestCases/Posix/basic-filtering.cpp
@@ -3,28 +3,32 @@
// RUN: %clangxx_xray -std=c++11 %s -o %t -g
// RUN: rm -f basic-filtering-*
-// RUN: XRAY_OPTIONS="patch_premain=true xray_mode=xray-basic verbosity=1 \
+// RUN: env XRAY_OPTIONS="patch_premain=true xray_mode=xray-basic verbosity=1 \
// RUN: xray_logfile_base=basic-filtering- \
// RUN: xray_naive_log_func_duration_threshold_us=1000 \
// RUN: xray_naive_log_max_stack_depth=2" %run %t 2>&1 | \
// RUN: FileCheck %s
+// RUN: ls basic-filtering-* | head -1 | tr -d '\n' > %t.log
// RUN: %llvm_xray convert --symbolize --output-format=yaml -instr_map=%t \
-// RUN: "`ls basic-filtering-* | head -1`" | \
+// RUN: "%{readfile:%t.log}" | \
// RUN: FileCheck %s --check-prefix TRACE
// RUN: rm -f basic-filtering-*
//
// Now check support for the XRAY_BASIC_OPTIONS environment variable.
-// RUN: XRAY_OPTIONS="patch_premain=true xray_mode=xray-basic verbosity=1 \
+// RUN: env XRAY_OPTIONS="patch_premain=true xray_mode=xray-basic verbosity=1 \
// RUN: xray_logfile_base=basic-filtering-" \
-// RUN: XRAY_BASIC_OPTIONS="func_duration_threshold_us=1000 max_stack_depth=2" \
+// RUN: env XRAY_BASIC_OPTIONS="func_duration_threshold_us=1000 max_stack_depth=2" \
// RUN: %run %t 2>&1 | FileCheck %s
+// RUN: ls basic-filtering-* | head -1 | tr -d '\n' > %t.log
// RUN: %llvm_xray convert --symbolize --output-format=yaml -instr_map=%t \
-// RUN: "`ls basic-filtering-* | head -1`" | \
+// RUN: "%{readfile:%t.log}" | \
// RUN: FileCheck %s --check-prefix TRACE
// RUN: rm -f basic-filtering-*
// REQUIRES: built-in-llvm-tree
+// UNSUPPORTED: armhf-linux
+
#include <cstdio>
#include <time.h>
diff --git a/compiler-rt/test/xray/TestCases/Posix/basic-mode-dso.cpp b/compiler-rt/test/xray/TestCases/Posix/basic-mode-dso.cpp
index d40dcd8..954c7ef 100644
--- a/compiler-rt/test/xray/TestCases/Posix/basic-mode-dso.cpp
+++ b/compiler-rt/test/xray/TestCases/Posix/basic-mode-dso.cpp
@@ -4,8 +4,9 @@
// RUN: %clangxx_xray -g -fPIC -fxray-instrument -fxray-shared -shared -std=c++11 %t/testlib.cpp -o %t/testlib.so
// RUN: %clangxx_xray -g -fPIC -fxray-instrument -fxray-shared -std=c++11 %t/main.cpp %t/testlib.so -Wl,-rpath,%t -o %t/main.o
-// RUN: XRAY_OPTIONS="patch_premain=false,xray_mode=xray-basic,xray_logfile_base=basic-mode-dso-,verbosity=1" XRAY_BASIC_OPTIONS="func_duration_threshold_us=0" %run %t/main.o 2>&1 | FileCheck %s
-// RUN: %llvm_xray account --format=csv --sort=funcid "`ls basic-mode-dso-* | head -1`" | FileCheck --check-prefix=ACCOUNT %s
+// RUN: env XRAY_OPTIONS="patch_premain=false,xray_mode=xray-basic,xray_logfile_base=basic-mode-dso-,verbosity=1" XRAY_BASIC_OPTIONS="func_duration_threshold_us=0" %run %t/main.o 2>&1 | FileCheck %s
+// RUN: ls basic-mode-dso-* | head -1 | tr -d '\n' > %t.log
+// RUN: %llvm_xray account --format=csv --sort=funcid "%{readfile:%t.log}" | FileCheck --check-prefix=ACCOUNT %s
// RUN: rm basic-mode-dso-*
// REQUIRES: target={{(aarch64|x86_64)-.*}}
diff --git a/compiler-rt/test/xray/TestCases/Posix/c-test.cpp b/compiler-rt/test/xray/TestCases/Posix/c-test.cpp
index 6427566..d7c7666 100644
--- a/compiler-rt/test/xray/TestCases/Posix/c-test.cpp
+++ b/compiler-rt/test/xray/TestCases/Posix/c-test.cpp
@@ -1,6 +1,6 @@
// RUN: %clang_xray -g -fxray-modes=xray-basic,xray-fdr,xray-profiling -o %t %s
// RUN: rm -f xray-log.c-test.*
-// RUN: XRAY_OPTIONS=patch_premain=true:verbosity=1:xray_mode=xray-basic %t \
+// RUN: env XRAY_OPTIONS=patch_premain=true:verbosity=1:xray_mode=xray-basic %t \
// RUN: 2>&1 | FileCheck %s
// RUN: rm -f xray-log.c-test.*
//
diff --git a/compiler-rt/test/xray/TestCases/Posix/common-trampoline-alignment.cpp b/compiler-rt/test/xray/TestCases/Posix/common-trampoline-alignment.cpp
index f918964..d072e57 100644
--- a/compiler-rt/test/xray/TestCases/Posix/common-trampoline-alignment.cpp
+++ b/compiler-rt/test/xray/TestCases/Posix/common-trampoline-alignment.cpp
@@ -2,7 +2,7 @@
// expect 16-byte alignment of the stack.
//
// RUN: %clangxx_xray -std=c++11 %s -o %t
-// RUN: XRAY_OPTIONS="patch_premain=false verbosity=1" \
+// RUN: env XRAY_OPTIONS="patch_premain=false verbosity=1" \
// RUN: %run %t 2>&1
// REQUIRES: x86_64-target-arch
// REQUIRES: built-in-llvm-tree
diff --git a/compiler-rt/test/xray/TestCases/Posix/custom-event-handler-alignment.cpp b/compiler-rt/test/xray/TestCases/Posix/custom-event-handler-alignment.cpp
index 9c61cba..1915482 100644
--- a/compiler-rt/test/xray/TestCases/Posix/custom-event-handler-alignment.cpp
+++ b/compiler-rt/test/xray/TestCases/Posix/custom-event-handler-alignment.cpp
@@ -2,7 +2,7 @@
// calls.
//
// RUN: %clangxx_xray -std=c++11 %s -o %t
-// RUN: XRAY_OPTIONS="patch_premain=false verbosity=1" \
+// RUN: env XRAY_OPTIONS="patch_premain=false verbosity=1" \
// RUN: %run %t 2>&1
// REQUIRES: x86_64-target-arch
// REQUIRES: built-in-llvm-tree
diff --git a/compiler-rt/test/xray/TestCases/Posix/custom-event-logging.cpp b/compiler-rt/test/xray/TestCases/Posix/custom-event-logging.cpp
index 30f4fff..cbdfe6c 100644
--- a/compiler-rt/test/xray/TestCases/Posix/custom-event-logging.cpp
+++ b/compiler-rt/test/xray/TestCases/Posix/custom-event-logging.cpp
@@ -1,9 +1,9 @@
// Use the clang feature for custom xray event logging.
//
// RUN: %clangxx_xray -std=c++11 %s -o %t
-// RUN: XRAY_OPTIONS="patch_premain=false verbosity=1 xray_logfile_base=custom-event-logging.xray-" %run %t 2>&1 | FileCheck %s
+// RUN: env XRAY_OPTIONS="patch_premain=false verbosity=1 xray_logfile_base=custom-event-logging.xray-" %run %t 2>&1 | FileCheck %s
// RUN: %clangxx_xray -std=c++11 -fpic -fpie %s -o %t
-// RUN: XRAY_OPTIONS="patch_premain=false verbosity=1 xray_logfile_base=custom-event-logging.xray-" %run %t 2>&1 | FileCheck %s
+// RUN: env XRAY_OPTIONS="patch_premain=false verbosity=1 xray_logfile_base=custom-event-logging.xray-" %run %t 2>&1 | FileCheck %s
// FIXME: Support this in non-x86_64 as well
// REQUIRES: target={{(aarch64|x86_64)-.*linux.*}}
// REQUIRES: built-in-llvm-tree
diff --git a/compiler-rt/test/xray/TestCases/Posix/default-options.cpp b/compiler-rt/test/xray/TestCases/Posix/default-options.cpp
index e00ff3b..73cb4dd 100644
--- a/compiler-rt/test/xray/TestCases/Posix/default-options.cpp
+++ b/compiler-rt/test/xray/TestCases/Posix/default-options.cpp
@@ -4,6 +4,8 @@
// REQUIRES: built-in-llvm-tree
+// UNSUPPORTED: ppc
+
extern "C" __attribute__((xray_never_instrument)) const char *
__xray_default_options() {
return "patch_premain=true:verbosity=1:xray_mode=xray-basic";
diff --git a/compiler-rt/test/xray/TestCases/Posix/fdr-mode-inmemory.cpp b/compiler-rt/test/xray/TestCases/Posix/fdr-mode-inmemory.cpp
index 6c94dbd..58a800a 100644
--- a/compiler-rt/test/xray/TestCases/Posix/fdr-mode-inmemory.cpp
+++ b/compiler-rt/test/xray/TestCases/Posix/fdr-mode-inmemory.cpp
@@ -2,12 +2,12 @@
// RUN: rm -rf %t.dir
// RUN: mkdir -p %t.dir
// RUN: cd %t.dir
-// RUN: XRAY_OPTIONS="patch_premain=false xray_logfile_base=fdr-inmemory-test- \
+// RUN: env XRAY_OPTIONS="patch_premain=false xray_logfile_base=fdr-inmemory-test- \
// RUN: verbosity=1" \
-// RUN: XRAY_FDR_OPTIONS="no_file_flush=true func_duration_threshold_us=0" \
+// RUN: env XRAY_FDR_OPTIONS="no_file_flush=true func_duration_threshold_us=0" \
// RUN: %run %t 2>&1 | FileCheck %s
-// RUN: FILES=`find %t.dir -name 'fdr-inmemory-test-*' | wc -l`
-// RUN: [ $FILES -eq 0 ]
+// RUN: find %t.dir -name 'fdr-inmemory-test-*' | wc -l | tr -d '\n' > %t.file_count
+// RUN: %python -c "import sys; sys.exit(int(sys.argv[1]))" %{readfile:%t.file_count}
// RUN: rm -rf %t.dir
//
// REQUIRES: built-in-llvm-tree
diff --git a/compiler-rt/test/xray/TestCases/Posix/fdr-mode-multiple.cpp b/compiler-rt/test/xray/TestCases/Posix/fdr-mode-multiple.cpp
index f9288d9..ffe43c9 100644
--- a/compiler-rt/test/xray/TestCases/Posix/fdr-mode-multiple.cpp
+++ b/compiler-rt/test/xray/TestCases/Posix/fdr-mode-multiple.cpp
@@ -2,12 +2,12 @@
// RUN: rm -rf %t.dir
// RUN: mkdir -p %t.dir
// RUN: cd %t.dir
-// RUN: XRAY_OPTIONS="patch_premain=false xray_logfile_base=fdr-inmemory-test- \
+// RUN: env XRAY_OPTIONS="patch_premain=false xray_logfile_base=fdr-inmemory-test- \
// RUN: verbosity=1" \
-// RUN: XRAY_FDR_OPTIONS="no_file_flush=true func_duration_threshold_us=0" \
+// RUN: env XRAY_FDR_OPTIONS="no_file_flush=true func_duration_threshold_us=0" \
// RUN: %run %t 2>&1 | FileCheck %s
-// RUN: FILES=`find %t.dir -name 'fdr-inmemory-test-*' | wc -l`
-// RUN: [ $FILES -eq 0 ]
+// RUN: find %t.dir -name 'fdr-inmemory-test-*' | wc -l | tr -d '\n' > %t.file_count
+// RUN: %python -c "import sys; sys.exit(int(sys.argv[1]))" %{readfile:%t.file_count}
// RUN: rm -rf %t.dir
//
// REQUIRES: built-in-llvm-tree
diff --git a/compiler-rt/test/xray/TestCases/Posix/fdr-mode.cpp b/compiler-rt/test/xray/TestCases/Posix/fdr-mode.cpp
index 0ee8aaa..4d4eb14 100644
--- a/compiler-rt/test/xray/TestCases/Posix/fdr-mode.cpp
+++ b/compiler-rt/test/xray/TestCases/Posix/fdr-mode.cpp
@@ -1,26 +1,29 @@
// RUN: %clangxx_xray -g -std=c++11 %s -o %t
// RUN: rm -f fdr-logging-test-*
// RUN: rm -f fdr-unwrite-test-*
-// RUN: XRAY_OPTIONS="patch_premain=false xray_logfile_base=fdr-logging-test- \
+// RUN: env XRAY_OPTIONS="patch_premain=false xray_logfile_base=fdr-logging-test- \
// RUN: xray_mode=xray-fdr verbosity=1" \
-// RUN: XRAY_FDR_OPTIONS="func_duration_threshold_us=0" \
+// RUN: env XRAY_FDR_OPTIONS="func_duration_threshold_us=0" \
// RUN: %run %t 2>&1 | FileCheck %s
-// RUN: XRAY_OPTIONS="patch_premain=false \
+// RUN: env XRAY_OPTIONS="patch_premain=false \
// RUN: xray_logfile_base=fdr-unwrite-test- xray_mode=xray-fdr \
// RUN: verbosity=1" \
-// RUN: XRAY_FDR_OPTIONS="func_duration_threshold_us=5000" \
+// RUN: env XRAY_FDR_OPTIONS="func_duration_threshold_us=5000" \
// RUN: %run %t 2>&1 | FileCheck %s
+// RUN: ls fdr-logging-test-* | head -1 | tr -d '\n' > %t.log
// RUN: %llvm_xray convert --symbolize --output-format=yaml -instr_map=%t \
-// RUN: "`ls fdr-logging-test-* | head -1`" \
+// RUN: "%{readfile:%t.log}" \
// RUN: | FileCheck %s --check-prefix=TRACE
+// RUN: ls fdr-unwrite-test-* | head -1 | tr -d '\n' > %t.log
// RUN: %llvm_xray convert --symbolize --output-format=yaml -instr_map=%t \
-// RUN: "`ls fdr-unwrite-test-* | head -1`" \
+// RUN: "%{readfile:%t.log}" \
// RUN: | FileCheck %s --check-prefix=UNWRITE
// RUN: rm fdr-logging-test-*
// RUN: rm fdr-unwrite-test-*
// UNSUPPORTED: target=powerpc64le-{{.*}}
/// TODO: FDR logging arg1 handler(__xray_ArgLoggerEntry) hasn't implemented yet on LoongArch
// UNSUPPORTED: target=loongarch64{{.*}}
+// UNSUPPORTED: armhf-linux
// REQUIRES: built-in-llvm-tree
#include "xray/xray_log_interface.h"
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 b8803ae..36a4e65 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{{.*}}
diff --git a/compiler-rt/test/xray/TestCases/Posix/fdr-thread-order.cpp b/compiler-rt/test/xray/TestCases/Posix/fdr-thread-order.cpp
index 85284fc..d3fd253 100644
--- a/compiler-rt/test/xray/TestCases/Posix/fdr-thread-order.cpp
+++ b/compiler-rt/test/xray/TestCases/Posix/fdr-thread-order.cpp
@@ -1,6 +1,6 @@
// RUN: rm -rf %t && mkdir %t
// RUN: %clangxx_xray -g -std=c++11 %s -o %t.exe
-// RUN: XRAY_OPTIONS="patch_premain=false \
+// RUN: env XRAY_OPTIONS="patch_premain=false \
// RUN: xray_logfile_base=%t/ xray_mode=xray-fdr verbosity=1" \
// RUN: XRAY_FDR_OPTIONS=func_duration_threshold_us=0 %run %t.exe 2>&1 | \
// RUN: FileCheck %s
diff --git a/compiler-rt/test/xray/TestCases/Posix/fork_basic_logging.cpp b/compiler-rt/test/xray/TestCases/Posix/fork_basic_logging.cpp
index 58f310e..d0905c1 100644
--- a/compiler-rt/test/xray/TestCases/Posix/fork_basic_logging.cpp
+++ b/compiler-rt/test/xray/TestCases/Posix/fork_basic_logging.cpp
@@ -1,11 +1,12 @@
// Check that when forking in basic logging mode, we get the different tids for child and parent
// RUN: %clangxx_xray -g -std=c++11 %s -o %t
// RUN: rm -f fork-basic-logging-test-*
-// RUN: XRAY_OPTIONS="patch_premain=true xray_logfile_base=fork-basic-logging-test- \
+// RUN: env XRAY_OPTIONS="patch_premain=true xray_logfile_base=fork-basic-logging-test- \
// RUN: xray_mode=xray-basic verbosity=1 xray_naive_log_func_duration_threshold_us=0" \
// RUN: %run %t 2>&1 | FileCheck %s
+// RUN: ls -S fork-basic-logging-test-* | head -1 | tr -d '\n' > %t.log
// RUN: %llvm_xray convert --symbolize --output-format=yaml -instr_map=%t \
-// RUN: "`ls -S fork-basic-logging-test-* | head -1`" \
+// RUN: "%{readfile:%t.log}" \
// RUN: | FileCheck %s --check-prefix=TRACE
// REQUIRES: x86_64-target-arch
diff --git a/compiler-rt/test/xray/TestCases/Posix/profiling-multi-threaded.cpp b/compiler-rt/test/xray/TestCases/Posix/profiling-multi-threaded.cpp
index b850c05..b1b8edc 100644
--- a/compiler-rt/test/xray/TestCases/Posix/profiling-multi-threaded.cpp
+++ b/compiler-rt/test/xray/TestCases/Posix/profiling-multi-threaded.cpp
@@ -4,11 +4,11 @@
// FIXME: Make -fxray-modes=xray-profiling part of the default?
// RUN: %clangxx_xray -std=c++11 %s -o %t -fxray-modes=xray-profiling
// RUN: rm -f xray-log.profiling-multi-*
-// RUN: XRAY_OPTIONS=verbosity=1 \
+// RUN: env XRAY_OPTIONS=verbosity=1 \
// RUN: XRAY_PROFILING_OPTIONS=no_flush=1 %run %t
-// RUN: XRAY_OPTIONS=verbosity=1 %run %t
-// RUN: PROFILES=`ls xray-log.profiling-multi-* | wc -l`
-// RUN: [ $PROFILES -eq 1 ]
+// RUN: env XRAY_OPTIONS=verbosity=1 %run %t
+// RUN: ls xray-log.profiling-multi-* | wc -l | tr -d '\n' > %t.profiles
+// RUN: %python -c "import sys; sys.exit(int(sys.argv[1]) - 1)" %{readfile:%t.profiles}
// RUN: rm -f xray-log.profiling-multi-*
//
// REQUIRES: built-in-llvm-tree
diff --git a/compiler-rt/test/xray/TestCases/Posix/profiling-single-threaded.cpp b/compiler-rt/test/xray/TestCases/Posix/profiling-single-threaded.cpp
index b235960..d84f75b 100644
--- a/compiler-rt/test/xray/TestCases/Posix/profiling-single-threaded.cpp
+++ b/compiler-rt/test/xray/TestCases/Posix/profiling-single-threaded.cpp
@@ -4,11 +4,11 @@
// FIXME: Make -fxray-modes=xray-profiling part of the default?
// RUN: %clangxx_xray -std=c++11 %s -o %t -fxray-modes=xray-profiling
// RUN: rm -f xray-log.profiling-single-*
-// RUN: XRAY_OPTIONS=verbosity=1 \
+// RUN: env XRAY_OPTIONS=verbosity=1 \
// RUN: XRAY_PROFILING_OPTIONS=no_flush=true %run %t
-// RUN: XRAY_OPTIONS=verbosity=1 %run %t
-// RUN: PROFILES=`ls xray-log.profiling-single-* | wc -l`
-// RUN: [ $PROFILES -eq 2 ]
+// RUN: env XRAY_OPTIONS=verbosity=1 %run %t
+// RUN: ls xray-log.profiling-single-* | wc -l | tr -d '\n' > %t.profiles
+// RUN: %python -c "import sys; sys.exit(int(sys.argv[1]) - 2)" %{readfile:%t.profiles}
// RUN: rm -f xray-log.profiling-single-*
//
// REQUIRES: built-in-llvm-tree
diff --git a/compiler-rt/test/xray/TestCases/Posix/quiet-start.cpp b/compiler-rt/test/xray/TestCases/Posix/quiet-start.cpp
index 4883001..d8e96e0 100644
--- a/compiler-rt/test/xray/TestCases/Posix/quiet-start.cpp
+++ b/compiler-rt/test/xray/TestCases/Posix/quiet-start.cpp
@@ -2,11 +2,11 @@
// instrumentation sleds.
//
// RUN: %clangxx -std=c++11 %s -o %t %xraylib
-// RUN: XRAY_OPTIONS="patch_premain=true verbosity=1" %run %t 2>&1 | \
+// RUN: env XRAY_OPTIONS="patch_premain=true verbosity=1" %run %t 2>&1 | \
// RUN: FileCheck %s --check-prefix NOISY
-// RUN: XRAY_OPTIONS="patch_premain=true verbosity=0" %run %t 2>&1 | \
+// RUN: env XRAY_OPTIONS="patch_premain=true verbosity=0" %run %t 2>&1 | \
// RUN: FileCheck %s --check-prefix QUIET
-// RUN: XRAY_OPTIONS="" %run %t 2>&1 | FileCheck %s --check-prefix DEFAULT
+// RUN: env XRAY_OPTIONS="" %run %t 2>&1 | FileCheck %s --check-prefix DEFAULT
// REQUIRES: built-in-llvm-tree
diff --git a/compiler-rt/test/xray/lit.site.cfg.py.in b/compiler-rt/test/xray/lit.site.cfg.py.in
index 72a7be6..021d999 100644
--- a/compiler-rt/test/xray/lit.site.cfg.py.in
+++ b/compiler-rt/test/xray/lit.site.cfg.py.in
@@ -5,7 +5,7 @@ config.name_suffix = "@XRAY_TEST_CONFIG_SUFFIX@"
config.xray_lit_source_dir = "@XRAY_LIT_SOURCE_DIR@"
config.target_cflags = "@XRAY_TEST_TARGET_CFLAGS@"
config.target_arch = "@XRAY_TEST_TARGET_ARCH@"
-config.built_with_llvm = ("@COMPILER_RT_STANDALONE_BUILD@" != "TRUE")
+config.built_with_llvm = "@COMPILER_RT_BUILT_WITH_LLVM@"
# TODO: Look into whether we can run a capability test on the standalone build to
# see whether it can run 'llvm-xray convert' instead of turning off tests for a