Skip to content

Conversation

jhuber6
Copy link
Contributor

@jhuber6 jhuber6 commented Sep 3, 2025

Summary:
Add a dependnecy on the unit tests on the main check-offload test suite.
This matches what the other projects do, pass llvm-lit to the
directory to only run the lit tests, use the check-offload-unit for
only the unit tests.

Summary:
Add a dependnecy on the unit tests on the main check-offload test suite.
This matches what the other projects do, pass `llvm-lit` to the
directory to only run the lit tests, use the `check-offload-unit` for
only the unit tests.
@llvmbot
Copy link
Member

llvmbot commented Sep 3, 2025

@llvm/pr-subscribers-offload

Author: Joseph Huber (jhuber6)

Changes

Summary:
Add a dependnecy on the unit tests on the main check-offload test suite.
This matches what the other projects do, pass llvm-lit to the
directory to only run the lit tests, use the check-offload-unit for
only the unit tests.


Full diff: https://github.com/llvm/llvm-project/pull/156675.diff

1 Files Affected:

  • (modified) offload/test/CMakeLists.txt (+1-1)
diff --git a/offload/test/CMakeLists.txt b/offload/test/CMakeLists.txt
index 711621de9075d..c317394ada66f 100644
--- a/offload/test/CMakeLists.txt
+++ b/offload/test/CMakeLists.txt
@@ -61,7 +61,7 @@ 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}
+  DEPENDS llvm-offload-device-info omptarget ${OMP_DEPEND} ${LIBOMPTARGET_TESTED_PLUGINS} check-offload-unit
   ARGS ${LIBOMPTARGET_LIT_ARG_LIST})
 
 # Add liboffload unit tests - the test binary will run on all available devices

Copy link
Contributor

@jplehr jplehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm
I think this is the right thing to do.

@jhuber6 jhuber6 merged commit 99f61f3 into llvm:main Sep 3, 2025
11 checks passed
@jplehr
Copy link
Contributor

jplehr commented Sep 4, 2025

It appears that this breaks the ability to do LIT_FILTER=offload/some-test ninja check-offload with a test coming from the lit tests.

Leaving this here as an observation and something we likely want to fix at some point.

@jhuber6
Copy link
Contributor Author

jhuber6 commented Sep 4, 2025

It appears that this breaks the ability to do LIT_FILTER=offload/some-test ninja check-offload with a test coming from the lit tests.

Leaving this here as an observation and something we likely want to fix at some point.

Hm, maybe the other targets do something slightly different to register their unit tests. Right now we just do add_test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants