From 40be6c0107bfeb1ee44ab87a29b375b5a6d29473 Mon Sep 17 00:00:00 2001 From: Ross Brunton Date: Thu, 17 Oct 2024 12:21:49 +0100 Subject: [PATCH] [NFC] Don't run conformance tests on mock adapter Closes: #2215 --- CMakeLists.txt | 8 ++++++++ test/conformance/CMakeLists.txt | 7 ------- test/conformance/source/environment.cpp | 1 - 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b931d27a02..8accadb56e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -225,6 +225,14 @@ if(UR_USE_MSAN) add_sanitizer_flag(memory) endif() +if(NOT (UR_BUILD_ADAPTER_CUDA OR UR_BUILD_ADAPTER_HIP + OR UR_BUILD_ADAPTER_L0 OR UR_BUILD_ADAPTER_OPENCL + OR UR_BUILD_ADAPTER_NATIVE_CPU OR UR_BUILD_ADAPTER_L0_V2 + OR UR_BUILD_ADAPTER_ALL)) + message(WARNING "No adapters have been enabled; conformance and sanitizer tests will not be ran") + message(STATUS "Consider setting UR_BUILD_ADAPTER_*") +endif() + # Check if clang-format (in correct version) is available for Cpp code formatting. if(UR_FORMAT_CPP_STYLE) find_program(CLANG_FORMAT NAMES clang-format-15 clang-format-15.0 clang-format) diff --git a/test/conformance/CMakeLists.txt b/test/conformance/CMakeLists.txt index 9a122e36b4..47fb490c88 100644 --- a/test/conformance/CMakeLists.txt +++ b/test/conformance/CMakeLists.txt @@ -86,13 +86,6 @@ function(add_conformance_test name) if(UR_BUILD_ADAPTER_NATIVE_CPU OR UR_BUILD_ADAPTER_ALL) add_test_adapter(${name} adapter_native_cpu NATIVE_CPU) endif() - - if(NOT (UR_BUILD_ADAPTER_CUDA OR UR_BUILD_ADAPTER_HIP - OR UR_BUILD_ADAPTER_L0 OR UR_BUILD_ADAPTER_OPENCL - OR UR_BUILD_ADAPTER_NATIVE_CPU OR UR_BUILD_ADAPTER_L0_V2 - OR UR_BUILD_ADAPTER_ALL)) - add_test_adapter(${name} adapter_mock MOCK) - endif() endfunction() function(add_conformance_test_with_kernels_environment name) diff --git a/test/conformance/source/environment.cpp b/test/conformance/source/environment.cpp index 495d51e1c1..ec339a5f40 100644 --- a/test/conformance/source/environment.cpp +++ b/test/conformance/source/environment.cpp @@ -34,7 +34,6 @@ constexpr std::pair backends[] = { {"HIP", UR_PLATFORM_BACKEND_HIP}, {"NATIVE_CPU", UR_PLATFORM_BACKEND_NATIVE_CPU}, {"UNKNOWN", UR_PLATFORM_BACKEND_UNKNOWN}, - {"MOCK", UR_PLATFORM_BACKEND_UNKNOWN}, }; namespace {