[Offload] Run liboffload unit tests as a part of check-offload (#189731)

Summary:
These are currently only run with check-offload-unit. Make them a part
of the other tests by putting a dependency on it. We did something like
this previously but it was reverted because the tests failed if there
were no GPUs (like in systems that only checked the CPU case) but I
think that has been fixed.
This commit is contained in:
Joseph Huber 2026-04-01 11:06:51 -05:00 committed by GitHub
parent 8a1d6c6f5e
commit b528f6746d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -51,13 +51,6 @@ add_offload_testsuite(check-libomptarget
DEPENDS llvm-offload-device-info omptarget ${OMP_DEPEND} ${LIBOMPTARGET_TESTED_PLUGINS}
ARGS ${LIBOMPTARGET_LIT_ARG_LIST})
add_offload_testsuite(check-offload
"Running libomptarget tests"
${LIBOMPTARGET_LIT_TESTSUITES}
EXCLUDE_FROM_CHECK_ALL
DEPENDS llvm-offload-device-info omptarget ${OMP_DEPEND} ${LIBOMPTARGET_TESTED_PLUGINS}
ARGS ${LIBOMPTARGET_LIT_ARG_LIST})
# Add liboffload unit tests - the test binary will run on all available devices
configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/unit/lit.site.cfg.in
@ -65,6 +58,15 @@ configure_lit_site_cfg(
MAIN_CONFIG
${CMAKE_CURRENT_SOURCE_DIR}/unit/lit.cfg.py)
add_offload_testsuite(check-offload
"Running offload tests"
${LIBOMPTARGET_LIT_TESTSUITES}
${CMAKE_CURRENT_BINARY_DIR}/unit
EXCLUDE_FROM_CHECK_ALL
DEPENDS llvm-offload-device-info omptarget ${OMP_DEPEND} ${LIBOMPTARGET_TESTED_PLUGINS}
LLVMOffload OffloadUnitTests
ARGS ${LIBOMPTARGET_LIT_ARG_LIST})
add_lit_testsuite(check-offload-unit "Running offload unittest suites"
${CMAKE_CURRENT_BINARY_DIR}/unit
EXCLUDE_FROM_CHECK_ALL