summaryrefslogtreecommitdiff
path: root/test/xray
diff options
context:
space:
mode:
authorDean Michael Berris <dberris@google.com>2016-11-25 03:14:10 +0000
committerDean Michael Berris <dberris@google.com>2016-11-25 03:14:10 +0000
commita41d49a482d8196c55942316c89bc5ffff068ec0 (patch)
tree9e546ba56188550ffe0985a3e9ae012e369301b3 /test/xray
parent36953735156bac2fe107f42808fb96bcd3d50a1f (diff)
[XRay][compiler-rt] XRay Buffer Queue
Summary: This implements a simple buffer queue to manage a pre-allocated queue of fixed-sized buffers to hold XRay records. We need this to support Flight Data Recorder (FDR) mode. We also implement this as a sub-library first to allow for development before actually using it in an implementation. Some important properties of the buffer queue: - Thread-safe enqueueing/dequeueing of fixed-size buffers. - Pre-allocation of buffers at construction. Reviewers: majnemer, rSerge, echristo Subscribers: mehdi_amini, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D26232 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@287910 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/xray')
-rw-r--r--test/xray/CMakeLists.txt9
-rw-r--r--test/xray/Unit/lit.site.cfg.in12
2 files changed, 21 insertions, 0 deletions
diff --git a/test/xray/CMakeLists.txt b/test/xray/CMakeLists.txt
index e58032d03..f3382c1b7 100644
--- a/test/xray/CMakeLists.txt
+++ b/test/xray/CMakeLists.txt
@@ -35,6 +35,15 @@ if (COMPILER_RT_BUILD_XRAY AND COMPILER_RT_HAS_XRAY)
endforeach()
endif()
+# Add unit tests.
+if(COMPILER_RT_INCLUDE_TESTS)
+ configure_lit_site_cfg(
+ ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in
+ ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg)
+ list(APPEND XRAY_TEST_DEPS XRayUnitTests)
+ list(APPEND XRAY_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/Unit)
+endif()
+
add_lit_testsuite(check-xray "Running the XRay tests"
${XRAY_TESTSUITES}
DEPENDS ${XRAY_TEST_DEPS})
diff --git a/test/xray/Unit/lit.site.cfg.in b/test/xray/Unit/lit.site.cfg.in
new file mode 100644
index 000000000..1ebc7b9ec
--- /dev/null
+++ b/test/xray/Unit/lit.site.cfg.in
@@ -0,0 +1,12 @@
+@LIT_SITE_CFG_IN_HEADER@
+
+import os
+
+# Load common config for all compiler-rt unit tests.
+lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/unittests/lit.common.unit.configured")
+
+# Setup config name.
+config.name = 'XRay-Unit'
+
+config.test_exec_root = "@COMPILER_RT_BINARY_DIR@/lib/xray/tests"
+config.test_source_root = config.test_exec_root