Skip to content

Use CTest to help with CI testing - #413

Merged
illuhad merged 4 commits into
KhronosGroup:mainfrom
EwanC:introduce_ctest
Jan 12, 2026
Merged

Use CTest to help with CI testing#413
illuhad merged 4 commits into
KhronosGroup:mainfrom
EwanC:introduce_ctest

Conversation

@EwanC

@EwanC EwanC commented Dec 19, 2025

Copy link
Copy Markdown
Contributor

The executable targets to run in acpp CI workflow are currently derived from shell scripting, which is a relatively fragile way to things.

This PR adds a ctest target for each of the executable created by the build, such that a user can easily run all the binaries by invoking $ ctest from the build directory. ctest was chosen as it has straightforward CMake integration, and I've tested it locally with both DPC++ and AdaptiveCPP builds of SYCL Academy.

I've updated the GitHub workflow for AdaptiveCpp to use the new functionality, passing a regex exclude filter for the tests known to be failing.

The executable targets to run in acpp CI workflow are currently derived from shell
scripting, which is a relatively fragile way to things.

This PR adds a ctest target for each of the executable created by the build, such
that a user can easily run all the binaries by invoking `$ ctest` from the
build directory. ctest was chosen as it has straightforward CMake integration,
and I've tested it locally with both DPC++ and AdaptiveCPP builds of SYCL Academy.

I've updated the GitHub workflow for AdaptiveCpp to use the new functionality,
passing a regex exclude filter for the tests known to be failing.

@illuhad illuhad left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great idea! My guess is that the failure in Matrix_transpose_source is because that file is a skeleton source code which in its current form submits an empty command group, which AdaptiveCpp would (rightfully) reject.

If we also want to CI-test the source skeletons then we might have to be a bit more careful with them since then even in their incomplete form they would need to be valid SYCL.

EDIT: Maybe it would be good if CI also printed the mentioned log file in /home/runner/work/syclacademy/syclacademy/build/Testing/Temporary/LastTest.log so that we can see what's going on, in case there's an issue?

@EwanC EwanC changed the title [WIP]Use CTest to help with CI testing Use CTest to help with CI testing Dec 22, 2025
@EwanC
EwanC marked this pull request as ready for review December 22, 2025 07:39
@EwanC

EwanC commented Dec 22, 2025

Copy link
Copy Markdown
Contributor Author

Great idea! My guess is that the failure in Matrix_transpose_source is because that file is a skeleton source code which in its current form submits an empty command group, which AdaptiveCpp would (rightfully) reject.

If we also want to CI-test the source skeletons then we might have to be a bit more careful with them since then even in their incomplete form they would need to be valid SYCL.

EDIT: Maybe it would be good if CI also printed the mentioned log file in /home/runner/work/syclacademy/syclacademy/build/Testing/Temporary/LastTest.log so that we can see what's going on, in case there's an issue?

I thought it might be nice to test the lesson source executables too, but it's more scope creep than i'm prepared for in this PR to go change lesson sources to become valid SYCL, so I've just omitted them from being added as ctest targets.

Good point about being able to see the LastTest.log, i've made the job print that file if ctest fails. You can see an example output of that in this action

@illuhad illuhad left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

I thought it might be nice to test the lesson source executables too, but it's more scope creep than i'm prepared for in this PR to go change lesson sources to become valid SYCL, so I've just omitted them from being added as ctest targets.

Yeah, I kind of expected that it might be more work than it looks at first glance. I'm fine with this approach.

Good point about being able to see the LastTest.log, i've made the job print that file if ctest fails. You can see an example output of that in this action

Looks great :)

@illuhad
illuhad merged commit 472d8f0 into KhronosGroup:main Jan 12, 2026
2 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.

2 participants