Skip to content

[libclc][test] Really run libspirv tests on all targets #19395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 15, 2025

Conversation

Maetveis
Copy link
Contributor

Due to the way add_lit_testsuite works, the check-all target was not running the libspirv (binding) tests on all targets, instead it was running it on the last target multiple times in parallel. Besides losing the coverage for other targets, this also caused sporadic failures due to tests overwriting each other. #17902 was an attempt to fix this, and it works for running all of the check-libclc-spirv-* cmake targets in parallel, but it does not work for the check-all target, which is what we use in the CI.

This patch fixes the issue by making a different lit test suite for each target. See the comment in libclc/test/CMakeLists.txt for more details.

Due to the way `add_lit_testsuite` works, the `check-all` target
was not running the libspirv (binding) tests on all targets, instead
it was running it on the last target multiple times in parallel.
Besides losing the coverage for other targets, this also caused
sporadic failures due to tests overwriting each other.
intel#17902 was an attempt to fix this,
and it works for running all of the `check-libclc-spirv-*` cmake targets
in parallel, but it does not work for the `check-all` target, which
is what we use in the CI.

This patch fixes the issue by making a different `lit` test suite
for each target. See the comment in `libclc/test/CMakeLists.txt`
for more details.
@Maetveis Maetveis requested a review from frasercrmck July 10, 2025 22:05
@Maetveis Maetveis requested a review from a team as a code owner July 10, 2025 22:05
@frasercrmck
Copy link
Contributor

Thanks for fixing this!

A bit of context is that I've been trying for over a year (on and off) to get libclc tested upstream. If/when that happens will likely be a completely different approach to testing and all of our downstream testing will need completely reworked, which is partly why I haven't given downstream testing much attention since taking it over.

I'll take a closer look at this PR on Monday. But with the background that this will (hopefully) be a temporary testing solution anyway, as long as something works then it's fine by me!

@bader bader merged commit ff5d4bd into intel:sycl Jul 15, 2025
24 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants