[llvm] [offload][lit] Run unit tests in check-offload if libomptarget isn't built (PR #214334)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 5 13:51:16 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-offload
Author: Nick Sarnie (sarnex)
<details>
<summary>Changes</summary>
Right now we define no top-level `check-offload` target if `libomptarget` isn't built.
Instead, just define the target to run the unit tests instead instead of running both the unit tests and the `libomptarget` tests we would do if `libomptarget` were built.
It's really useful to have a top-level target to run tests, especially for CI.
This target will be used by our Windows buildbot, as `libomptarget` isn't supported on Windows.
---
Full diff: https://github.com/llvm/llvm-project/pull/214334.diff
1 Files Affected:
- (modified) offload/test/CMakeLists.txt (+7)
``````````diff
diff --git a/offload/test/CMakeLists.txt b/offload/test/CMakeLists.txt
index 6ba30da82227f..10f6898fdfa03 100644
--- a/offload/test/CMakeLists.txt
+++ b/offload/test/CMakeLists.txt
@@ -74,6 +74,13 @@ if(TARGET omptarget)
DEPENDS ${OFFLOAD_TOOLS} omptarget ${OMP_DEPEND} ${LIBOMPTARGET_TESTED_PLUGINS}
LLVMOffload OffloadUnitTests
ARGS ${LIBOMPTARGET_LIT_ARG_LIST})
+else()
+ add_offload_testsuite(check-offload
+ "Running offload tests"
+ ${CMAKE_CURRENT_BINARY_DIR}/unit
+ EXCLUDE_FROM_CHECK_ALL
+ DEPENDS ${OFFLOAD_TOOLS} ${LIBOMPTARGET_TESTED_PLUGINS}
+ LLVMOffload OffloadUnitTests)
endif()
add_lit_testsuite(check-offload-unit "Running offload unittest suites"
``````````
</details>
https://github.com/llvm/llvm-project/pull/214334
More information about the llvm-commits
mailing list