Skip to content

Conversation

pratikvn
Copy link
Member

This PR adds the ability to pass in labels to tests which can then be used to run tests matching specific labels ctest -L <>. It also reduces the sizes of some tests to speedup when GINKGO_FAST_TESTS is enabled.

I found the labels feature, and thought it would be interesting to have, but I think it is not necessary.

@pratikvn pratikvn added the 1:ST:need-feedback The PR is somewhat ready but feedback on a blocking topic is required before a proper review. label Apr 15, 2025
@pratikvn pratikvn self-assigned this Apr 15, 2025
@ginkgo-bot ginkgo-bot added reg:build This is related to the build system. reg:testing This is related to testing. mod:reference This is related to the reference module. type:solver This is related to the solvers type:matrix-format This is related to the Matrix formats type:factorization This is related to the Factorizations type:multigrid This is related to multigrid labels Apr 15, 2025
@pratikvn pratikvn requested a review from a team April 15, 2025 09:31
@MarcelKoch
Copy link
Member

What benefit does using the label option of ctest have compared to the regex option? It should already be possible to, for example, run all reference tests just by using ctest -R reference.

Copy link
Member

@upsj upsj left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment on lines 224 to 227
if(add_test_LABEL)
set_tests_properties(
${REL_BINARY_DIR}/${test_binary_name}
PROPERTIES LABELS "${add_test_LABEL}"
)
endif()
Copy link
Member

@upsj upsj Apr 15, 2025

Choose a reason for hiding this comment

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

nice find - seems supported since at least CMake 3.16, so I think this could be useful. We could also use it to add executor information

@upsj
Copy link
Member

upsj commented Apr 15, 2025

@MarcelKoch Labels can be a list of keywords, thus carry more information than just the test name.

@MarcelKoch
Copy link
Member

@upsj sure, but the question is rather, what labels could we have that are not already found in the test name?

@upsj
Copy link
Member

upsj commented Apr 15, 2025

I think it would be cleaner to use labels for things like MPI usage, executor type, differentiation between core/device, since things like mpi or omp are also part of words that might pop up inside Ginkgo, like compression (or less likely: compiler)

@yhmtsai
Copy link
Member

yhmtsai commented Apr 15, 2025

you can also use /omp or _omp for that

@upsj
Copy link
Member

upsj commented Apr 15, 2025

Those are two patterns that match different subsets of our tests. What I'm saying is that we are using the names for something they are not meant to do, labels would be a cleaner solution

@pratikvn pratikvn added 1:ST:no-changelog-entry Skip the wiki check for changelog update 1:ST:ready-for-review This PR is ready for review and removed 1:ST:need-feedback The PR is somewhat ready but feedback on a blocking topic is required before a proper review. labels Apr 15, 2025
@pratikvn pratikvn added 1:ST:ready-to-merge This PR is ready to merge. and removed 1:ST:ready-for-review This PR is ready for review labels Apr 22, 2025
@pratikvn pratikvn merged commit fc67314 into develop Apr 22, 2025
9 of 11 checks passed
@pratikvn pratikvn deleted the faster-tests branch April 22, 2025 11:26
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1:ST:no-changelog-entry Skip the wiki check for changelog update 1:ST:ready-to-merge This PR is ready to merge. mod:reference This is related to the reference module. reg:build This is related to the build system. reg:testing This is related to testing. type:factorization This is related to the Factorizations type:matrix-format This is related to the Matrix formats type:multigrid This is related to multigrid type:solver This is related to the solvers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants