Skip to content

Commit

Permalink
Switch Cache Creator unit tests to gtest/gmock
Browse files Browse the repository at this point in the history
Allow tests to be executed with lit (`ninja check-cache-creator-units`).

This is keep consistent with LLPC and LLVM.
  • Loading branch information
kuhar authored and JaxLinAMD committed Aug 4, 2021
1 parent 5b352af commit 5cb0bf5
Show file tree
Hide file tree
Showing 10 changed files with 375 additions and 6,645 deletions.
13 changes: 2 additions & 11 deletions tools/cache_creator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,6 @@ add_dependencies(xgl cache-creator cache-info)
if(XGL_BUILD_LIT)
message(STATUS "Building cache creator LIT tests")
set(CACHE_CREATOR_TOOLS_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
add_subdirectory(test "${CMAKE_CURRENT_BINARY_DIR}/test/cache-creator")
add_subdirectory(test "${CMAKE_CURRENT_BINARY_DIR}/test/cache-creator/lit")
add_subdirectory(unittests "${CMAKE_CURRENT_BINARY_DIR}/test/cache-creator/unittests")
endif()

# This executable runs cache-creator unit tests.
add_executable(cache-creator-unit-tests)
target_sources(cache-creator-unit-tests PRIVATE
units/cache_creator_units_main.cpp
units/cache_creator_tests.cpp
units/cache_info_tests.cpp
)
target_include_directories(cache-creator-unit-tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(cache-creator-unit-tests PRIVATE cache_creator_lib)
5 changes: 2 additions & 3 deletions tools/cache_creator/docker/check_xgl.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ RUN cat /vulkandriver/build_info.txt \
WORKDIR /vulkandriver/builds/ci-build
RUN source /vulkandriver/env.sh \
&& cmake --build . \
&& cmake --build . --target amdvlk64.so cache-creator cache-creator-unit-tests
&& cmake --build . --target amdvlk64.so cache-creator

# Run cache-creator tests.
RUN source /vulkandriver/env.sh \
&& cmake --build . --target check-cache-creator \
&& tools/cache-creator-unit-tests
&& cmake --build . --target check-cache-creator check-cache-creator-units
171 changes: 0 additions & 171 deletions tools/cache_creator/units/cache_creator_tests.cpp

This file was deleted.

31 changes: 0 additions & 31 deletions tools/cache_creator/units/cache_creator_units_main.cpp

This file was deleted.

Loading

0 comments on commit 5cb0bf5

Please sign in to comment.