Skip to content

Commit

Permalink
Merge pull request #2218 from RossBrunton/ross/nomock
Browse files Browse the repository at this point in the history
[NFC] Don't run conformance tests on mock adapter
  • Loading branch information
RossBrunton authored Oct 18, 2024
2 parents d68fc55 + 06c927c commit 28c402f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 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)
Expand Down
7 changes: 0 additions & 7 deletions test/conformance/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion test/conformance/source/environment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ constexpr std::pair<const char *, ur_platform_backend_t> backends[] = {
{"HIP", UR_PLATFORM_BACKEND_HIP},
{"NATIVE_CPU", UR_PLATFORM_BACKEND_NATIVE_CPU},
{"UNKNOWN", UR_PLATFORM_BACKEND_UNKNOWN},
{"MOCK", UR_PLATFORM_BACKEND_UNKNOWN},
};

namespace {
Expand Down

0 comments on commit 28c402f

Please sign in to comment.