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
142 lines
3.7 KiB
CMake
142 lines
3.7 KiB
CMake
# Test runner infrastructure for Flang. This configures the Flang test trees
|
|
# for use by Lit, and delegates to LLVM's lit test handlers.
|
|
add_subdirectory(lib)
|
|
|
|
llvm_canonicalize_cmake_booleans(
|
|
FLANG_STANDALONE_BUILD
|
|
LLVM_BYE_LINK_INTO_TOOLS
|
|
LLVM_ENABLE_PLUGINS
|
|
LLVM_INCLUDE_EXAMPLES
|
|
)
|
|
|
|
set(FLANG_TOOLS_DIR ${FLANG_BINARY_DIR}/bin)
|
|
|
|
# Check if 128-bit float computations can be done via long double
|
|
check_cxx_source_compiles(
|
|
"#include <cfloat>
|
|
#if LDBL_MANT_DIG != 113
|
|
#error LDBL_MANT_DIG != 113
|
|
#endif
|
|
int main() { return 0; }
|
|
"
|
|
HAVE_LDBL_MANT_DIG_113)
|
|
|
|
# FIXME In out-of-tree builds, "SHLIBDIR" is undefined and passing it to
|
|
# `configure_lit_site_cfg` leads to a configuration error. This is currently
|
|
# only required by plugins/examples, which are not supported in out-of-tree
|
|
# builds.
|
|
if (FLANG_STANDALONE_BUILD)
|
|
set(PATHS_FOR_PLUGINS "")
|
|
else ()
|
|
set(PATHS_FOR_PLUGINS "SHLIBDIR")
|
|
endif ()
|
|
|
|
configure_lit_site_cfg(
|
|
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
|
|
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
|
|
MAIN_CONFIG
|
|
${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
|
|
PATHS
|
|
${PATHS_FOR_PLUGINS}
|
|
)
|
|
|
|
configure_lit_site_cfg(
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.py.in
|
|
${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg.py
|
|
MAIN_CONFIG
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.cfg.py
|
|
)
|
|
|
|
configure_lit_site_cfg(
|
|
${CMAKE_CURRENT_SOURCE_DIR}/NonGtestUnit/lit.site.cfg.py.in
|
|
${CMAKE_CURRENT_BINARY_DIR}/NonGtestUnit/lit.site.cfg.py
|
|
MAIN_CONFIG
|
|
${CMAKE_CURRENT_SOURCE_DIR}/NonGtestUnit/lit.cfg.py
|
|
)
|
|
|
|
set(FLANG_TEST_PARAMS
|
|
flang_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py)
|
|
|
|
set(FLANG_TEST_DEPENDS
|
|
flang
|
|
module_files
|
|
fir-opt
|
|
tco
|
|
bbc
|
|
FortranDecimal
|
|
)
|
|
|
|
if (NOT FLANG_STANDALONE_BUILD)
|
|
list(APPEND FLANG_TEST_DEPENDS
|
|
llvm-config
|
|
FileCheck
|
|
count
|
|
not
|
|
llvm-bcanalyzer
|
|
llvm-dis
|
|
llvm-objcopy
|
|
llvm-objdump
|
|
llvm-profdata
|
|
llvm-readelf
|
|
llvm-readobj
|
|
split-file
|
|
)
|
|
endif ()
|
|
|
|
if (LLVM_INCLUDE_EXAMPLES AND LLVM_ENABLE_PLUGINS AND NOT (WIN32 OR CYGWIN) AND NOT FLANG_STANDALONE_BUILD)
|
|
list(APPEND FLANG_TEST_DEPENDS Bye)
|
|
endif()
|
|
|
|
if (FLANG_INCLUDE_TESTS)
|
|
if (FLANG_GTEST_AVAIL)
|
|
list(APPEND FLANG_TEST_DEPENDS FlangUnitTests)
|
|
endif()
|
|
endif()
|
|
|
|
if (LLVM_INCLUDE_EXAMPLES)
|
|
list(APPEND FLANG_TEST_DEPENDS
|
|
flangPrintFunctionNames
|
|
flangOmpReport
|
|
flangFeatureList
|
|
)
|
|
endif ()
|
|
|
|
if ("openmp" IN_LIST LLVM_ENABLE_RUNTIMES AND NOT FLANG_STANDALONE_BUILD)
|
|
list(APPEND FLANG_TEST_DEPENDS "libomp-mod")
|
|
endif ()
|
|
|
|
if ("flang-rt" IN_LIST LLVM_ENABLE_RUNTIMES AND NOT FLANG_STANDALONE_BUILD)
|
|
# Flang tests need runtimes module files (flang-rt-mod, libomp-mod, etc.).
|
|
add_custom_target(flang-rt-test-deps)
|
|
list(APPEND FLANG_TEST_DEPENDS flang-rt-test-deps)
|
|
endif ()
|
|
|
|
add_custom_target(flang-test-depends DEPENDS ${FLANG_TEST_DEPENDS})
|
|
set_target_properties(flang-test-depends PROPERTIES FOLDER "Flang/Meta")
|
|
|
|
add_lit_testsuite(check-flang "Running the Flang regression tests"
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
PARAMS ${FLANG_TEST_PARAMS}
|
|
DEPENDS ${FLANG_TEST_DEPENDS}
|
|
)
|
|
set_target_properties(check-flang PROPERTIES FOLDER "Flang/Meta")
|
|
|
|
# In case of standalone builds.
|
|
if (FLANG_STANDALONE_BUILD)
|
|
add_lit_testsuites(FLANG ${CMAKE_CURRENT_BINARY_DIR}
|
|
PARAMS ${FLANG_TEST_PARAMS}
|
|
DEPENDS ${FLANG_TEST_DEPENDS})
|
|
else()
|
|
add_lit_testsuites(FLANG ${CMAKE_CURRENT_SOURCE_DIR}
|
|
PARAMS ${FLANG_TEST_PARAMS}
|
|
DEPENDS ${FLANG_TEST_DEPENDS})
|
|
endif()
|
|
|
|
# To modify the default target triple for flang tests.
|
|
if (DEFINED FLANG_TEST_TARGET_TRIPLE)
|
|
if (NOT DEFINED LLVM_TARGET_TRIPLE_ENV OR LLVM_TARGET_TRIPLE_ENV STREQUAL "")
|
|
message(FATAL_ERROR "LLVM_TARGET_TRIPLE_ENV must also be defined in order "
|
|
"to use FLANG_TEST_TARGET_TRIPLE.")
|
|
endif()
|
|
endif()
|