summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKeith Wyss <wyssman@gmail.com>2017-04-19 17:20:47 +0000
committerKeith Wyss <wyssman@gmail.com>2017-04-19 17:20:47 +0000
commit88ccfa16b381f20856cb12a195b184a2e9e54f1b (patch)
tree2e4c3d93b0ba10ab8cbe7f1b095c6f1e99fbcad0 /test
parent8b205e90b46fa52e41c48539776991c98c860670 (diff)
Skip tests that use 'llvm_xray' for standalone builds.
Summary: Tests that generate output with compiler-rt and verify it with the llvm_xray command (built from the llvm tree) are extremely convenient, but compiler-rt can be built out of tree and llvm_xray is not built for every target. This change intends to disable tests for out of tree builds, but does nothing to detect whether llvm_xray can be found elsewhere on the path, is fresh enough, or is part of a build target for the in tree build. Tested: Tested that this didn't break check-xray. Haven't reproduced bots or standalone builds. Reviewers: dberris, kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32150 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@300716 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/xray/TestCases/Linux/fdr-mode.cc1
-rw-r--r--test/xray/TestCases/Linux/fdr-thread-order.cc2
-rw-r--r--test/xray/lit.site.cfg.in4
3 files changed, 7 insertions, 0 deletions
diff --git a/test/xray/TestCases/Linux/fdr-mode.cc b/test/xray/TestCases/Linux/fdr-mode.cc
index 9fb54ce7b..ae7ad863a 100644
--- a/test/xray/TestCases/Linux/fdr-mode.cc
+++ b/test/xray/TestCases/Linux/fdr-mode.cc
@@ -7,6 +7,7 @@
// RUN: rm fdr-unwrite-test-*
// FIXME: Make llvm-xray work on non-x86_64 as well.
// REQUIRES: x86_64-linux
+// REQUIRES: built-in-llvm-tree
#include "xray/xray_log_interface.h"
#include <cassert>
diff --git a/test/xray/TestCases/Linux/fdr-thread-order.cc b/test/xray/TestCases/Linux/fdr-thread-order.cc
index 5edef2be2..814fb70b0 100644
--- a/test/xray/TestCases/Linux/fdr-thread-order.cc
+++ b/test/xray/TestCases/Linux/fdr-thread-order.cc
@@ -4,6 +4,8 @@
// RUN: rm fdr-thread-order.*
// FIXME: Make llvm-xray work on non-x86_64 as well.
// REQUIRES: x86_64-linux
+// REQUIRES: built-in-llvm-tree
+
#include "xray/xray_log_interface.h"
#include <thread>
#include <cassert>
diff --git a/test/xray/lit.site.cfg.in b/test/xray/lit.site.cfg.in
index ee0ffcad4..32d9f7f39 100644
--- a/test/xray/lit.site.cfg.in
+++ b/test/xray/lit.site.cfg.in
@@ -5,6 +5,10 @@ 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@" == "FALSE")
+
+if config.built_with_llvm:
+ config.available_features.add('built-in-llvm-tree')
# Load common config for all compiler-rt lit tests
lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/test/lit.common.configured")