Files
TheRock/rocm-systems/projects/rocprofiler-systems/tests/CMakeLists.txt
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

120 lines
3.9 KiB
CMake

# Copyright (c) Advanced Micro Devices, Inc.
# SPDX-License-Identifier: MIT
#
# rocprofiler-systems tests
#
include_guard(GLOBAL)
include(${CMAKE_CURRENT_LIST_DIR}/pytest/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/rocprof-sys-pytest.cmake)
# ------------------------------------------------------------------------------#
#
# Move test files to build directory
#
# ------------------------------------------------------------------------------#
set(ROCPROFSYS_PYTHON_VALIDATION_FILES
${CMAKE_CURRENT_LIST_DIR}/check_amd_smi_metrics.py
${CMAKE_CURRENT_LIST_DIR}/validate-causal-json.py
${CMAKE_CURRENT_LIST_DIR}/validate-perfetto-proto.py
${CMAKE_CURRENT_LIST_DIR}/validate-rocpd.py
${CMAKE_CURRENT_LIST_DIR}/validate-timemory-json.py
${CMAKE_CURRENT_LIST_DIR}/validate-unified-memory.py
)
set(ROCPROFSYS_TEST_SCRIPTS
${CMAKE_CURRENT_LIST_DIR}/get_default_nic.sh
${CMAKE_CURRENT_LIST_DIR}/generate_papi_nic_events.sh
${CMAKE_CURRENT_LIST_DIR}/run_rocprofiler_systems.py
)
set(_capchk_dir ${CMAKE_BINARY_DIR}/share/rocprofiler-systems/tests)
add_executable(
rocprof-sys-capchk
EXCLUDE_FROM_ALL
${CMAKE_CURRENT_LIST_DIR}/rocprof-sys-capchk.cpp
)
set_target_properties(
rocprof-sys-capchk
PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
RUNTIME_OUTPUT_DIRECTORY "${_capchk_dir}"
)
# test_categories.yaml drives tier (quick/standard/comprehensive/full) label
# injection at CTest-generate time (see conftest.py:_load_test_categories).
set(ROCPROFSYS_TEST_CATEGORIES_YAML ${CMAKE_CURRENT_LIST_DIR}/test_categories.yaml)
configure_file(
${ROCPROFSYS_TEST_CATEGORIES_YAML}
${CMAKE_BINARY_DIR}/share/rocprofiler-systems/tests/test_categories.yaml
COPYONLY
)
add_custom_target(
copy-test-files
ALL
COMMAND
${CMAKE_COMMAND} -E make_directory
${CMAKE_BINARY_DIR}/share/rocprofiler-systems/tests
COMMAND
${CMAKE_COMMAND} -E copy_if_different ${ROCPROFSYS_PYTHON_VALIDATION_FILES}
${CMAKE_BINARY_DIR}/share/rocprofiler-systems/tests
COMMAND
${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_LIST_DIR}/README.md
${CMAKE_BINARY_DIR}/share/rocprofiler-systems/tests
COMMAND
${CMAKE_COMMAND} -E copy_if_different ${ROCPROFSYS_TEST_CATEGORIES_YAML}
${CMAKE_BINARY_DIR}/share/rocprofiler-systems/tests
COMMAND
${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_LIST_DIR}/rocpd-validation-rules
${CMAKE_BINARY_DIR}/share/rocprofiler-systems/tests/rocpd-validation-rules
COMMAND
${CMAKE_COMMAND} -E copy_if_different ${ROCPROFSYS_TEST_SCRIPTS}
${CMAKE_BINARY_DIR}/share/rocprofiler-systems/tests
)
add_dependencies(copy-test-files rocprof-sys-capchk)
# ------------------------------------------------------------------------------#
#
# Pytests install
#
# ------------------------------------------------------------------------------#
if(ROCPROFSYS_INSTALL_TESTING)
# Python Validation scripts
install(
PROGRAMS ${ROCPROFSYS_PYTHON_VALIDATION_FILES}
DESTINATION share/rocprofiler-systems/tests
COMPONENT rocprofiler-systems-tests
)
install(
DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/rocpd-validation-rules
DESTINATION share/rocprofiler-systems/tests
COMPONENT rocprofiler-systems-tests
)
# Scripts
install(
PROGRAMS ${ROCPROFSYS_TEST_SCRIPTS}
DESTINATION share/rocprofiler-systems/tests
COMPONENT rocprofiler-systems-tests
)
# Capability check binary
install(
TARGETS rocprof-sys-capchk
RUNTIME
DESTINATION share/rocprofiler-systems/tests
COMPONENT rocprofiler-systems-tests
)
# Test categories policy
install(
FILES ${ROCPROFSYS_TEST_CATEGORIES_YAML}
DESTINATION share/rocprofiler-systems/tests
COMPONENT rocprofiler-systems-tests
)
endif()