Skip to content

Commit

Permalink
[NFC] Don't run conformance tests on mock adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
RossBrunton committed Oct 17, 2024
1 parent 7c19b36 commit d2e5bcd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 8 additions & 7 deletions test/conformance/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@

set(UR_CONFORMANCE_TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR})

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(STATUS "No adapters have been enabled; conformance tests will not be ran")
message(STATUS "Consider setting UR_BUILD_ADAPTER_*")
endif()

set(UR_CONFORMANCE_DEVICE_BINARIES_DIR
"${CMAKE_CURRENT_BINARY_DIR}/device_binaries" CACHE INTERNAL
"Internal cache variable for device binaries directory")
Expand Down Expand Up @@ -86,13 +94,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 d2e5bcd

Please sign in to comment.