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
92 lines
3.1 KiB
CMake
92 lines
3.1 KiB
CMake
# Copyright (c) Advanced Micro Devices, Inc.
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
#
|
|
# rocprofiler-systems pytest install
|
|
#
|
|
include_guard(GLOBAL)
|
|
|
|
# ------------------------------------------------------------------------------#
|
|
# Pytest specific
|
|
# ------------------------------------------------------------------------------#
|
|
|
|
set(ROCPROFSYS_PYTEST_PACKAGE_FILES
|
|
${CMAKE_CURRENT_LIST_DIR}/rocprofsys/__init__.py
|
|
${CMAKE_CURRENT_LIST_DIR}/rocprofsys/cache.py
|
|
${CMAKE_CURRENT_LIST_DIR}/rocprofsys/config.py
|
|
${CMAKE_CURRENT_LIST_DIR}/rocprofsys/environment.py
|
|
${CMAKE_CURRENT_LIST_DIR}/rocprofsys/gpu.py
|
|
${CMAKE_CURRENT_LIST_DIR}/rocprofsys/runners.py
|
|
${CMAKE_CURRENT_LIST_DIR}/rocprofsys/validators.py
|
|
${CMAKE_CURRENT_LIST_DIR}/rocprofsys/capabilities.py
|
|
)
|
|
|
|
file(
|
|
GLOB ROCPROFSYS_PYTEST_TEST_FILES
|
|
CONFIGURE_DEPENDS
|
|
"${CMAKE_CURRENT_LIST_DIR}/test_*.py"
|
|
)
|
|
set(ROCPROFSYS_PYTEST_FILES
|
|
${CMAKE_CURRENT_LIST_DIR}/conftest.py
|
|
${ROCPROFSYS_PYTEST_TEST_FILES}
|
|
)
|
|
|
|
add_custom_target(
|
|
copy-pytest-files
|
|
ALL
|
|
DEPENDS ${ROCPROFSYS_PYTEST_PACKAGE_FILES} ${ROCPROFSYS_PYTEST_FILES}
|
|
COMMAND
|
|
${CMAKE_COMMAND} -E make_directory
|
|
${CMAKE_BINARY_DIR}/share/rocprofiler-systems/tests/pytest/rocprofsys
|
|
COMMAND
|
|
${CMAKE_COMMAND} -E copy_if_different ${ROCPROFSYS_PYTEST_PACKAGE_FILES}
|
|
${CMAKE_BINARY_DIR}/share/rocprofiler-systems/tests/pytest/rocprofsys/
|
|
COMMAND
|
|
${CMAKE_COMMAND} -E copy_if_different ${ROCPROFSYS_PYTEST_FILES}
|
|
${CMAKE_BINARY_DIR}/share/rocprofiler-systems/tests/pytest/
|
|
COMMAND
|
|
${CMAKE_COMMAND} -E copy_if_different ${PROJECT_SOURCE_DIR}/requirements.txt
|
|
${CMAKE_BINARY_DIR}/share/rocprofiler-systems/tests/
|
|
COMMENT "Copying pytest files to build directory"
|
|
)
|
|
|
|
if(ROCPROFSYS_INSTALL_TESTING)
|
|
# Build standalone pytest binary
|
|
set(ROCPROFSYS_STANDALONE_OUTPUT_DIR
|
|
${CMAKE_BINARY_DIR}/share/rocprofiler-systems/tests
|
|
)
|
|
set(ROCPROFSYS_STANDALONE_EXE
|
|
${ROCPROFSYS_STANDALONE_OUTPUT_DIR}/rocprofsys-tests.pyz
|
|
)
|
|
add_custom_command(
|
|
OUTPUT ${ROCPROFSYS_STANDALONE_EXE}
|
|
COMMAND
|
|
${CMAKE_CURRENT_LIST_DIR}/build_standalone.sh --output-dir
|
|
${ROCPROFSYS_STANDALONE_OUTPUT_DIR}
|
|
DEPENDS
|
|
${CMAKE_CURRENT_LIST_DIR}/build_standalone.sh
|
|
${ROCPROFSYS_PYTEST_PACKAGE_FILES}
|
|
${ROCPROFSYS_PYTEST_FILES}
|
|
COMMENT "Building standalone pytest binary"
|
|
VERBATIM
|
|
)
|
|
|
|
add_custom_target(build-standalone-pytest ALL DEPENDS ${ROCPROFSYS_STANDALONE_EXE})
|
|
|
|
install(
|
|
PROGRAMS ${ROCPROFSYS_STANDALONE_EXE}
|
|
DESTINATION share/rocprofiler-systems/tests
|
|
COMPONENT rocprofiler-systems-tests
|
|
)
|
|
install(
|
|
FILES ${CMAKE_BINARY_DIR}/share/rocprofiler-systems/tests/requirements.txt
|
|
DESTINATION share/rocprofiler-systems/tests
|
|
COMPONENT rocprofiler-systems-tests
|
|
)
|
|
install(
|
|
FILES ${CMAKE_BINARY_DIR}/share/rocprofiler-systems/tests/README.md
|
|
DESTINATION share/rocprofiler-systems/tests
|
|
COMPONENT rocprofiler-systems-tests
|
|
)
|
|
endif()
|