Issue
While packaging CMake (dpkg-buildpackage -rfakeroot -uc -b
), I see that lot of tests fail because stderr does not match that expected.
I see that expected stderr has some wierd symbols and that results in mismatch. Those wierd symbols are there in the source code files itself https://github.com/Kitware/CMake/blob/v3.25.1/Tests/RunCMake/VerifyHeaderSets/VerifyHeaderSetsNonexistent-stderr.txt
Actual stdout:
actual-out> Not searching for unused variables given on the command line.
actual-out> -- The C compiler identification is GNU 9.3.0
actual-out> -- Detecting C compiler ABI info
actual-out> -- Detecting C compiler ABI info - done
actual-out> -- Check for working C compiler: /usr/bin/cc - skipped
actual-out> -- Detecting C compile features
actual-out> -- Detecting C compile features - done
actual-out> -- Configuring done
Expected stderr to match:
expect-err> ^CMake Error in CMakeLists\.txt:
expect-err> Property INTERFACE_HEADER_SETS_TO_VERIFY of target "nonexistent" contained
expect-err> the following header sets that are nonexistent or not INTERFACE:
expect-err>
expect-err> b
expect-err> c
expect-err>
expect-err>
expect-err> CMake Generate step failed\. Build files cannot be regenerated correctly\.$
Actual stderr:
actual-err> CMake Error in CMakeLists.txt:
actual-err> Property INTERFACE_HEADER_SETS_TO_VERIFY of target "nonexistent" contained
actual-err> the following header sets that are nonexistent or not INTERFACE:
actual-err>
actual-err> b
actual-err> c
actual-err>
actual-err>
actual-err> CMake Generate step failed. Build files cannot be regenerated correctly.
How can I get rid of these test fails?
Solution
This is worth asking the CMake maintainers directly on their official discourse: https://discourse.cmake.org/
I see that expected stderr has some weird symbols and that results in mismatch. Those weird symbols are there in the source code files itself
However before you ask there you should try and narrow down what's going on.
CMake uses regular expressions in it's testing to verify the output of stdout
/stderr
.
I don't see anything wrong with the regex however.
I ended up looking at the releases on the official gitlab and it appears testing passed perfectly for 3.25.0: https://gitlab.kitware.com/cmake/cmake/-/pipelines/307118
Does this test fail on 3.25.0, 3.25.3, 3.26 or 3.27 out of curiosity? Does this test fail locally or only on CI?
Answered By - jpr42 Answer Checked By - David Marino (WPSolving Volunteer)