CMake: Add runtests.pl targets, do not build test programs unless necessary - #5368
Closed
Lekensteyn wants to merge 2 commits into
Closed
CMake: Add runtests.pl targets, do not build test programs unless necessary#5368Lekensteyn wants to merge 2 commits into
Lekensteyn wants to merge 2 commits into
Conversation
The default target should only build libcurl and curl. Add a dedicated 'testdeps' target which will be used later when running tests. Note that unittests are currently broken in CMake and already excluded.
* runtests.pl:
- Fix out-of-tree build under CMake when srcdir is not set. Default
srcdir to the location of runtests.pl.
- Add a hack to allow CMake to use the TFLAGS option as documented
in tests/README and used in scripts/travis/script.sh.
* Bump CMake version to 3.2 for USES_TERMINAL, dropping Debian Jessie
support (no one should care, it is already EOL.).
* Remove CTest since it defines its own 'test' target with no tests
since all unittests are already broken and not built by default.
* Add new test targets based on the options from Makefile.am. Since
new test targets are rarely added, I opted for duplicating the
runtests.pl options as opposed to creating a new Makefile.inc file.
Use top-level target names (test-x) instead of x-test since that is
used by CI and others.
jzakrzewski
reviewed
May 11, 2020
jzakrzewski
approved these changes
May 12, 2020
jzakrzewski
left a comment
Contributor
There was a problem hiding this comment.
No time to actually test it but looks very reasonable for me
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Executive overview, see invididual commits for details:
Minor details:
The next step is to run these tests for the CMake builds in CI, but that would introduce a conflict with my cmake-http3 branch that also modifies the travis config, so I'll wait for that to get merged first.
ninja test-nonflaky summary
The failing tests seem to be existing CMake issues that can be fixed later:
test 1014...[Compare curl --version with curl-config --features]
test 1026...[curl --manual ]
test 1139...[Verify that all libcurl options have man pages]