CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
97 lines
2.4 KiB
CMake
97 lines
2.4 KiB
CMake
# Copyright (c) Advanced Micro Devices, Inc. All rights reserved.
|
|
#
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
include(AISAddExecutable)
|
|
find_package(Threads REQUIRED)
|
|
|
|
set(SHARED_SOURCE_FILES
|
|
"${HIPFILE_TEST_COMMON_PATH}/magic-word.cpp"
|
|
)
|
|
|
|
set(TEST_SOURCE_FILES
|
|
api_trace.cpp
|
|
async.cpp
|
|
backend.cpp
|
|
batch/batch.cpp
|
|
configuration.cpp
|
|
context.cpp
|
|
buffer.cpp
|
|
driver.cpp
|
|
environment.cpp
|
|
file-descriptor.cpp
|
|
handle.cpp
|
|
hip.cpp
|
|
hipfile-api.cpp
|
|
hipfile-stats.cpp
|
|
fallback.cpp
|
|
fastpath.cpp
|
|
main.cpp
|
|
mountinfo.cpp
|
|
stats.cpp
|
|
stream.cpp
|
|
)
|
|
|
|
set(TEST_SYSINCLS
|
|
${HIPFILE_AMD_SOURCE_PATH}
|
|
${HIPFILE_INCLUDE_PATH}
|
|
${HIPFILE_TEST_COMMON_PATH}
|
|
${HIPFILE_AMD_TEST_PATH}
|
|
${HIPFILE_THIRD_PARTY_PATH}
|
|
)
|
|
|
|
ais_add_test_executable(
|
|
NAME internal_tests
|
|
DEPS hipfile
|
|
SRCS ${TEST_SOURCE_FILES} ${SHARED_SOURCE_FILES}
|
|
SYSINCLS ${TEST_SYSINCLS}
|
|
)
|
|
|
|
# Add gtest
|
|
target_link_libraries(internal_tests PRIVATE GTest::gmock)
|
|
target_link_libraries(internal_tests PRIVATE GTest::gtest)
|
|
target_compile_options(internal_tests PRIVATE -pthread)
|
|
target_link_options(internal_tests PRIVATE -pthread)
|
|
|
|
ais_gtest_discover_tests(
|
|
internal_tests
|
|
PROPERTIES "LABELS;unit;LABELS;internal"
|
|
TEST_LIST internal_unit_tests
|
|
)
|
|
|
|
# The following tests are concurrency testers. They run for a short
|
|
# time to sniff out any egregious lock errors. Be aware that they
|
|
# may "pass" in CI for a while after buggy code has been committed,
|
|
# so test failures may not be due to the commit in which you
|
|
# observe the failure.
|
|
|
|
ais_add_test_executable(
|
|
NAME state_mt
|
|
DEPS hipfile
|
|
SRCS "state_mt.cpp"
|
|
SYSINCLS ${HIPFILE_AMD_SOURCE_PATH} ${HIPFILE_INCLUDE_PATH}
|
|
)
|
|
|
|
target_link_libraries(state_mt PRIVATE Threads::Threads)
|
|
|
|
add_test(
|
|
NAME state_mt_test
|
|
COMMAND gdb --batch --quiet -ex run -ex "thread apply all bt full" --return-child-result --args $<TARGET_FILE:state_mt>
|
|
)
|
|
set_tests_properties(state_mt_test PROPERTIES LABELS "stress;internal")
|
|
|
|
ais_add_test_executable(
|
|
NAME batch_mt
|
|
DEPS hipfile
|
|
SRCS "batch/batch_mt.cpp"
|
|
SYSINCLS ${HIPFILE_AMD_SOURCE_PATH} ${HIPFILE_INCLUDE_PATH}
|
|
)
|
|
|
|
target_link_libraries(batch_mt PRIVATE Threads::Threads)
|
|
|
|
add_test(
|
|
NAME batch_mt_test
|
|
COMMAND gdb --batch --quiet -ex run -ex "thread apply all bt full" --return-child-result --args $<TARGET_FILE:batch_mt>
|
|
)
|
|
set_tests_properties(batch_mt_test PROPERTIES LABELS "stress;internal")
|