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
78 lines
3.0 KiB
CMake
78 lines
3.0 KiB
CMake
# Copyright (c) Advanced Micro Devices, Inc.
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
set(UNIT_TEST_OBJECTS
|
|
$<TARGET_OBJECTS:lib-common-tests>
|
|
$<TARGET_OBJECTS:trace-cache-tests>
|
|
$<TARGET_OBJECTS:demangler-tests>
|
|
$<TARGET_OBJECTS:track-registry-tests>
|
|
$<TARGET_OBJECTS:packet-framing-tests>
|
|
$<TARGET_OBJECTS:perfetto-engine-tests>
|
|
$<TARGET_OBJECTS:perfetto-sinks-tests>
|
|
$<TARGET_OBJECTS:emission-handshake-tls-contract-tests>
|
|
$<TARGET_OBJECTS:output-format-tests>
|
|
$<TARGET_OBJECTS:parse-numeric-range-tests>
|
|
$<TARGET_OBJECTS:rank-passes-filter-tests>
|
|
$<TARGET_OBJECTS:progress-tests>
|
|
$<TARGET_OBJECTS:logger-tests>
|
|
$<TARGET_OBJECTS:lib-components-tests>
|
|
$<TARGET_OBJECTS:rocprofiler-sdk-components-unit-tests>
|
|
$<$<TARGET_EXISTS:rccl-unit-tests>:$<TARGET_OBJECTS:rccl-unit-tests>>
|
|
$<$<TARGET_EXISTS:bin-common-tests>:$<TARGET_OBJECTS:bin-common-tests>>
|
|
)
|
|
|
|
list(APPEND UNIT_TEST_OBJECTS $<TARGET_OBJECTS:amd-smi-backend-tests>)
|
|
list(APPEND UNIT_TEST_OBJECTS $<TARGET_OBJECTS:pmc-amd-smi-provider-tests>)
|
|
list(APPEND UNIT_TEST_OBJECTS $<TARGET_OBJECTS:pmc-common-tests>)
|
|
list(APPEND UNIT_TEST_OBJECTS $<TARGET_OBJECTS:pmc-gpu-collector-tests>)
|
|
list(APPEND UNIT_TEST_OBJECTS $<TARGET_OBJECTS:pmc-nic-collector-tests>)
|
|
list(APPEND UNIT_TEST_OBJECTS $<TARGET_OBJECTS:pmc-cpu-collector-tests>)
|
|
list(APPEND UNIT_TEST_OBJECTS $<TARGET_OBJECTS:procfs-backend-tests>)
|
|
list(
|
|
APPEND UNIT_TEST_OBJECTS
|
|
$<$<TARGET_EXISTS:rocprofiler-sdk-backend-tests>:$<TARGET_OBJECTS:rocprofiler-sdk-backend-tests>>
|
|
)
|
|
set(_rocprofsys_have_sdk_pmc_tests FALSE)
|
|
if(
|
|
(ROCPROFSYS_ROCM_VERSION_MAJOR GREATER 6)
|
|
OR (
|
|
ROCPROFSYS_ROCM_VERSION_MAJOR EQUAL 6
|
|
AND ROCPROFSYS_ROCM_VERSION_MINOR GREATER_EQUAL 4
|
|
)
|
|
)
|
|
set(_rocprofsys_have_sdk_pmc_tests TRUE)
|
|
endif()
|
|
list(
|
|
APPEND UNIT_TEST_OBJECTS
|
|
$<$<BOOL:${_rocprofsys_have_sdk_pmc_tests}>:$<TARGET_OBJECTS:pmc-sdk-pmc-collector-tests>>
|
|
)
|
|
|
|
add_executable(rocprof-sys-unit-tests ${UNIT_TEST_OBJECTS})
|
|
|
|
target_link_libraries(
|
|
rocprof-sys-unit-tests
|
|
PRIVATE
|
|
rocprofiler-systems-googletest-library
|
|
rocprofiler-systems-common-library
|
|
rocprofiler-systems-core-library
|
|
rocprofiler-systems::rocprofiler-systems-binary
|
|
$<$<TARGET_EXISTS:rocprofiler-systems-bin-common>:rocprofiler-systems::rocprofiler-systems-bin-common>
|
|
rocprofiler-systems::rocprofiler-systems-interface-library
|
|
)
|
|
|
|
target_include_directories(
|
|
rocprof-sys-unit-tests
|
|
PRIVATE ${PROJECT_SOURCE_DIR}/source/lib/rocprof-sys ${PROJECT_SOURCE_DIR}/source/lib
|
|
)
|
|
|
|
# Do NOT link rocprofiler-systems-object-library into unit tests.
|
|
# It contains library.cpp whose static initializers instantiate thread_data /
|
|
# thread_deleter, causing a TSan deadlock during atexit.
|
|
get_target_property(_ut_libs rocprof-sys-unit-tests LINK_LIBRARIES)
|
|
if(_ut_libs MATCHES "rocprofiler-systems-object-library")
|
|
message(
|
|
FATAL_ERROR
|
|
"rocprof-sys-unit-tests must NOT link rocprofiler-systems-object-library. "
|
|
)
|
|
endif()
|