On 3. 6. 25 22:21, Branko Čibej wrote:
On 3. 6. 25 21:46, Timofei Zhakov wrote:
- On the other hand, this means that you can't actually test the shared version -- the one that you'll most probably use. So it would be better to fix the tests with shared libs as well. It seems pretty easy to do, since the only limit is a few hidden private symbols.

You actually can (and should) test against the shared lib, the catch is that we aren't setting the runpath for that. Basically, you'd set the runpath at build time so that the tests can use the library, then at install time, you'd modify it to the install prefix. That, or require the shared lib to be installed before the tests can run. Or, as we can do on macOS, use a relative runpath. It's just a matter of choosing one way and implementing it.

By the way, there's another reason for testing only with the static library: some of the tests exercise Serf's private functions, which are available in the static lib but are not exported from the shared lib (that is: until recently, they were, except on Windows; as of half an hour ago, that has changed on Linux and macOS as well). So we'd have to disable some of the tests to link with the shared lib, and, yes, basically we'd need two test executables, one that would use the shared lib and one with the static one and the extra tests.

All of which is doable.

-- Brane

Reply via email to