Skip to content

check: fix invalid ctest invocation#169

Closed
flokli wants to merge 1 commit intoscipopt:masterfrom
flokli:cmake-fixes
Closed

check: fix invalid ctest invocation#169
flokli wants to merge 1 commit intoscipopt:masterfrom
flokli:cmake-fixes

Conversation

@flokli
Copy link
Contributor

@flokli flokli commented Oct 7, 2025

ctest doesn't like -R "-default". CMake 4.0 fails with the following error message:

CMake Error: Invalid value used with -R

-R normally specifies the regex that needs to match. If none is specified, all are selected:

https://cmake.org/cmake/help/latest/manual/ctest.1.html#cmdoption-ctest-R

This maybe never worked, but got silently ignored until https://cmake.org/cmake/help/latest/policy/CMP0175.html

Removing that regex should only cause more tests to get selected, not less - and the build now succeeds with it.

ctest doesn't like `-R "-default"`. CMake 4.0 fails with the following
error message:

> CMake Error: Invalid value used with -R

`-R` normally specifies the regex that needs to match. If none is
specified, all are selected:

https://cmake.org/cmake/help/latest/manual/ctest.1.html#cmdoption-ctest-R

This maybe never worked, but got silently ignored until
https://cmake.org/cmake/help/latest/policy/CMP0175.html

Removing that regex should only cause *more* tests to get selected, not
less - and the build now succeeds with it.
@svigerske svigerske self-assigned this Oct 8, 2025
@svigerske
Copy link
Member

svigerske commented Oct 8, 2025

I think -default was meant to be the regex. It was supposed to select all tests that have a -default in the name, like MIP-default-misc03.mps but not MIP-heuristics_off-misc03.mps, for example.
(And the -E applications to exclude all "applications" tests.)

Is -default invalid regex syntax with cmake 4.0? Or it gets confused and thinks that this is not the value of -R but a separate ctest flag?

@flokli
Copy link
Contributor Author

flokli commented Oct 8, 2025

Maybe the latter? But as I wrote, removing the regex should cause more things to be selected, and everything still succeeds. So it's probably ok to just drop it?

@svigerske
Copy link
Member

The purpose of the target is to run a subset of the tests, which should run faster than doing a full ctest. So getting more selected is not so ok.

I can actually reproduce on my machine (ctest 4.1.1), and using -R=-default seems to work. So I'll change it to that.

@scip-ci scip-ci closed this in 821ba2b Oct 8, 2025
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