Files
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

43 lines
2.3 KiB
CMake

################################################################################
# Copyright (C) 2023 Advanced Micro Devices, Inc.
################################################################################
macro(rocm_cmake_add_test_argument CMAKE_VAR VAR_TYPE DOC_STRING)
set(ROCM_${CMAKE_VAR} "${${CMAKE_VAR}}" CACHE ${VAR_TYPE} "${DOC_STRING}")
if(DEFINED ${CMAKE_VAR})
string(REPLACE ";" "|" ROCM_${CMAKE_VAR} "${ROCM_${CMAKE_VAR}}")
# Some variables, such as CMAKE_GENERATOR_INSTANCE will be INTERNAL empty vars
# and relaying/setting them as empty vars explicitly will conflict with makefile
# generators
if(NOT "${${CMAKE_VAR}}" STREQUAL "")
list(APPEND TEST_ARGUMENTS -D "ROCM_${CMAKE_VAR}:${VAR_TYPE}=${ROCM_${CMAKE_VAR}}")
endif()
endif()
endmacro()
rocm_cmake_add_test_argument(CMAKE_MAKE_PROGRAM FILEPATH "Make program to relay to test projects")
rocm_cmake_add_test_argument(CMAKE_GENERATOR STRING "Generator to relay to test projects")
rocm_cmake_add_test_argument(CMAKE_GENERATOR_INSTANCE STRING "Generator instance to relay to test projects")
rocm_cmake_add_test_argument(CMAKE_GENERATOR_PLATFORM STRING "Generator platform to relay to test projects")
rocm_cmake_add_test_argument(CMAKE_GENERATOR_TOOLSET STRING "Generator toolset to relay to test projects")
rocm_cmake_add_test_argument(CMAKE_PREFIX_PATH PATH "Prefix path to relay to test projects")
rocm_cmake_add_test_argument(CMAKE_PROGRAM_PATH PATH "Program path to relay to test projects")
function(rocm_cmake_create_test NAME TEST)
add_custom_target(${NAME} COMMAND ${CMAKE_COMMAND} ${TEST_ARGUMENTS} -P ${CMAKE_CURRENT_SOURCE_DIR}/test.cmake ${TEST} ${CMAKE_CURRENT_BINARY_DIR}/tmp/${NAME})
add_test(NAME ${NAME} COMMAND ${CMAKE_COMMAND} ${TEST_ARGUMENTS} -P ${CMAKE_CURRENT_SOURCE_DIR}/test.cmake ${TEST} ${CMAKE_CURRENT_BINARY_DIR}/tmp/${NAME} COMMAND_EXPAND_LISTS)
endfunction()
file(GLOB PASS_TESTS pass/*.cmake)
foreach(TEST ${PASS_TESTS})
get_filename_component(NAME ${TEST} NAME_WE)
rocm_cmake_create_test(pass-${NAME} ${TEST})
endforeach()
file(GLOB FAIL_TESTS fail/*.cmake)
foreach(TEST ${FAIL_TESTS})
get_filename_component(NAME ${TEST} NAME_WE)
rocm_cmake_create_test(fail-${NAME} ${TEST})
set_tests_properties(fail-${NAME} PROPERTIES WILL_FAIL On)
endforeach()