diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 8c0e3bac86..25f238b3d5 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -127,7 +127,7 @@ jobs: - name: Test working-directory: ${{github.workspace}}/build - run: ctest -C ${{matrix.build_type}} --output-on-failure -L "umf|loader|validation|tracing|unit|urtrace" + run: ctest -C ${{matrix.build_type}} --output-on-failure fuzztest: name: Fuzz tests short diff --git a/CMakeLists.txt b/CMakeLists.txt index b931d27a02..41ac1146c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -225,6 +225,16 @@ if(UR_USE_MSAN) add_sanitizer_flag(memory) endif() +set(ANY_ADAPTER ON) +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_*") + set(ANY_ADAPTER OFF) +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 { diff --git a/test/layers/sanitizer/CMakeLists.txt b/test/layers/sanitizer/CMakeLists.txt index a9601a89c8..c0d7ab6235 100644 --- a/test/layers/sanitizer/CMakeLists.txt +++ b/test/layers/sanitizer/CMakeLists.txt @@ -34,4 +34,6 @@ function(add_sanitizer_test name) set_sanitizer_test_properties(${name}) endfunction() -add_sanitizer_test(asan asan.cpp) +if(ANY_ADAPTER) + add_sanitizer_test(asan asan.cpp) +endif()