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
63 lines
1.8 KiB
CMake
63 lines
1.8 KiB
CMake
# A rule to add startup system tests. When we have a complete startup system,
|
|
# we should be able to use the add_libc_unittest rule or an extension of it.
|
|
# But, while the system is being developed, we need to use a special rule like
|
|
# this.
|
|
function(add_startup_test target_name)
|
|
if(NOT CMAKE_HOST_UNIX)
|
|
message(
|
|
WARNING
|
|
"Test for the startup system currently assume a POSIX/Unix like "
|
|
"environment and may not work on your platform.")
|
|
endif()
|
|
|
|
cmake_parse_arguments(
|
|
"ADD_STARTUP_TEST"
|
|
"" # No option arguments
|
|
"SRC" # Single value arguments
|
|
"DEPENDS;ARGS;ENV" # Multivalue arguments.
|
|
${ARGN}
|
|
)
|
|
|
|
get_fq_target_name(${target_name} fq_target_name)
|
|
add_executable(
|
|
${fq_target_name}
|
|
EXCLUDE_FROM_ALL
|
|
${ADD_STARTUP_TEST_SRC}
|
|
)
|
|
|
|
set_target_properties(${fq_target_name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
target_include_directories(
|
|
${fq_target_name}
|
|
PRIVATE
|
|
${LIBC_SOURCE_DIR}
|
|
${LIBC_BUILD_DIR}
|
|
${LIBC_INCLUDE_DIR}
|
|
)
|
|
|
|
if(ADD_STARTUP_TEST_DEPENDS)
|
|
get_fq_deps_list(fq_deps_list ${ADD_STARTUP_TEST_DEPENDS})
|
|
add_dependencies(${fq_target_name} ${fq_deps_list})
|
|
get_object_files_for_test(link_object_files has_skipped_entrypoint_list ${fq_deps_list})
|
|
target_link_libraries(${fq_target_name} ${link_object_files})
|
|
endif()
|
|
|
|
target_link_options(
|
|
${fq_target_name}
|
|
BEFORE PRIVATE
|
|
-nostdlib
|
|
)
|
|
|
|
add_custom_command(
|
|
TARGET ${fq_target_name}
|
|
POST_BUILD
|
|
COMMAND ${ADD_STARTUP_TEST_ENV} $<TARGET_FILE:${fq_target_name}> ${ADD_STARTUP_TEST_ARGS}
|
|
)
|
|
|
|
add_dependencies(libc_startup_tests ${fq_target_name})
|
|
endfunction(add_startup_test)
|
|
|
|
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
|
|
add_subdirectory(${LIBC_TARGET_OS})
|
|
endif()
|