-
Notifications
You must be signed in to change notification settings - Fork 1.1k
cmake: support the use of launchers in ctest -S scripts #1687
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
base: master
Are you sure you want to change the base?
Conversation
@@ -13,6 +13,7 @@ project(libsecp256k1 | |||
LANGUAGES C | |||
) | |||
enable_testing() | |||
include(CTestUseLaunchers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this deserves a comment. Otherwise, it looks like an unused import.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find it hard to come up with a comment that is not stating the obvious. The CTestUseLaunchers
module has a single purpose, explained in its documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find it hard to come up with a comment that is not stating the obvious. The
CTestUseLaunchers
module has a single purpose, explained in its documentation.
Okay, I tend to think what is obvious or not is in the eye of the beholder. I assume it's not obvious for the typical reader.
What about?
include(CTestUseLaunchers) | |
include(CTestUseLaunchers) # for "ctest -S" scripts of the user |
The crucial part here is "of the user". This line is not needed for anything we currently have in our repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The crucial part here is "of the user". This line is not needed for anything we currently have in our repo.
I agree.
cc @hebasto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK.
This PR is about integrating ctest
with CDash—a web-based dashboard that collects results from a software build and test pipeline driven by ctest
. It collects warnings and errors from each stage of the pipeline, and shows per-stage
summaries with the ability to click through to each warning or error.
I've created a dashboard for this project for testing and demonstration purposes.
The dashboard accepts submissions from anyone, potentially broadening test coverage with environments defined by other developers.
This PR raises a few questions:
-
Do we want to adopt CDash as part of the project's testing framework going forward?
-
If so, what would the timeline look like (e.g., initial experimentation, migrating all CI jobs to CMake, etc.)?
Regarding this PR specifically, it’s important to note that CDash can be used by other developers regardless of whether there is an “official” project dashboard.
Therefore, this change can be immediately beneficial.
In particular, set(CTEST_USE_LAUNCHERS YES)
improves CDash logs by exposing the command lines used during the build. See an example here.
UPD. Many thanks to @purpleKarrot for the helpful offline discussions regarding this topic!
@@ -13,6 +13,7 @@ project(libsecp256k1 | |||
LANGUAGES C | |||
) | |||
enable_testing() | |||
include(CTestUseLaunchers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The crucial part here is "of the user". This line is not needed for anything we currently have in our repo.
I agree.
I had no idea. This looks useful indeed, if only to browse our CI builds better. |
When
CTEST_USE_LAUNCHERS
is set toON
in actest -S
script, the configure step fails with the error message:However,
include(CTest)
produces unwanted clutter.include(CTestUseLaunchers)
is a more lightweight alternative.To reproduce the issue, run the following script with and without the PR applied.