Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ if(CMAKE_HIP_PLATFORM STREQUAL "nvidia")
endif()
endif()

if(NOT AIS_TEST_DIR)
set(AIS_TEST_DIR "/tmp" CACHE STRING "Directory to use for e2e tests.")
if(NOT AIS_CAPABLE_DIR)
set(AIS_CAPABLE_DIR "/tmp" CACHE STRING "Directory to use for e2e tests.")
endif()

#-----------------------------------------------------------------------------
Expand Down
15 changes: 11 additions & 4 deletions hipfile/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

include(AISAddExecutable)
include(AISUseGTest)
find_package(Boost COMPONENTS program_options REQUIRED)

set(SHARED_SOURCE_FILES
"${CMAKE_SOURCE_DIR}/shared/test/magic-word.cpp"
Expand All @@ -23,8 +24,11 @@ set(UNIT_TEST_SOURCE_FILES
# They will not pass if a HIP capable GPU is not present
# and configured on the system.
set(SYSTEM_TEST_SOURCE_FILES
system/system.cpp
system/buffer.cpp
system/config.cpp
system/driver.cpp
system/main.cpp
system/version.cpp
)

set(TEST_SYSINCLS
Expand All @@ -47,6 +51,9 @@ ais_add_executable(
SRCS ${UNIT_TEST_SOURCE_FILES} ${SHARED_SOURCE_FILES}
SYSINCLS ${TEST_SYSINCLS}
)
target_compile_options(hipfile_tests
PRIVATE -Wno-unused-function
)
target_link_libraries(hipfile_tests PRIVATE GTest::gtest)
target_link_libraries(hipfile_tests PRIVATE GTest::gtest_main)
if(CMAKE_HIP_PLATFORM STREQUAL "amd")
Expand All @@ -55,7 +62,7 @@ endif()

ais_gtest_discover_tests(
hipfile_tests
WORKING_DIRECTORY ${AIS_TEST_DIR}
WORKING_DIRECTORY ${AIS_CAPABLE_DIR}
PROPERTIES LABELS unit
TEST_LIST hipfile_unit_tests
)
Expand All @@ -67,14 +74,14 @@ ais_add_executable(
SYSINCLS ${TEST_SYSINCLS}
)
target_link_libraries(hipfile_system_tests PRIVATE GTest::gtest)
target_link_libraries(hipfile_system_tests PRIVATE GTest::gtest_main)
target_link_libraries(hipfile_system_tests PRIVATE Boost::program_options)
if(CMAKE_HIP_PLATFORM STREQUAL "amd")
target_link_libraries(hipfile_system_tests PRIVATE rocfile_shared)
endif()

gtest_discover_tests(
hipfile_system_tests
WORKING_DIRECTORY ${AIS_TEST_DIR}
WORKING_DIRECTORY ${AIS_CAPABLE_DIR}
PROPERTIES LABELS system
)

Expand Down
Loading
Loading