Skip to content
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

cmake build doesn't support 'make show' in tests #3109

Closed
bagder opened this issue Oct 7, 2018 · 8 comments

Comments

@bagder
Copy link
Member

commented Oct 7, 2018

I did this

See the Windows tests run by appveyor. Build to enable tests, then run all tests.

The tests/runtests.pl script invokes make show in the tests/data directory to figure out which test cases that the makefile knows about. With a cmake build, I think this fails so runtests.pl then (wrongly) thinks the makefile knows of no test files which will lead to the following issue.

example

I expected the following

The normal output without lines like this:

[00:11:42] Warning: test904 not present in tests/data/Makefile.inc

This warning appears when the script runs a test that it hasn't seen in the makefile with make show, as mentioned above.

curl/libcurl version

current git master

operating system

I presume this happens on all systems when built with cmake.

@bagder bagder added cmake tests labels Oct 7, 2018

@bagder

This comment has been minimized.

Copy link
Member Author

commented Oct 8, 2018

It seems we don't support running tests at all with cmake builds so there's a lot more than just that warning that's left to fix... The appveyor cmake build that run tests is a bit of a work-around.

@MarcelRaad

This comment has been minimized.

Copy link
Member

commented Oct 8, 2018

Oh, I thought that was the only thing. What else have you found?

@bagder

This comment has been minimized.

Copy link
Member Author

commented Oct 8, 2018

Aaah. When I build with cmake there's no way to invoke the builds against my current build. Researching further, this is because I always build with cmake out-of-tree...

An autotool build makes 'make check' work even for out-of-tree builds. With a cmake build I need to build in-tree to be able to cd tests && ./runtests.pl.

@bagder bagder added the help wanted label Oct 8, 2018

@MarcelRaad

This comment has been minimized.

Copy link
Member

commented Oct 8, 2018

Ah, I didn't know this was possible with the autotools build. I'll read up on that subject, but probably my autotools and CMake knowledge is too low yet.

@snikulov

This comment has been minimized.

Copy link
Member

commented Oct 9, 2018

@bagder I've tried to implement some changes to be able to run tests with CMake build. It was related to changing runtests.pl to use BINDIR environment variable.

@snikulov

This comment has been minimized.

Copy link
Member

commented Oct 9, 2018

@bagder I've rebased my branch to latest master so if you'll try to execute
bindir=<path to cmake build dir> ./runtests.pl in tests directory - it should work (on my branch)

@jzakrzewski

This comment has been minimized.

Copy link
Contributor

commented Nov 6, 2018

I've tried to make those tests working but figured that changes to runtest.pl would be required. Not knowing even enough perl to be dangerous, I've abandoned the idea.
I must check you patch when I have some time.

@KangLin

This comment has been minimized.

Copy link

commented Nov 9, 2018

@bagder I've tried to implement some changes to be able to run tests with CMake build. It was related to changing runtests.pl to use BINDIR environment variable.

It is recommended to pass the command line parameters at the same time.

@bagder bagder closed this in 885eea1 Feb 14, 2019

@lock lock bot locked as resolved and limited conversation to collaborators May 15, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants
You can’t perform that action at this time.