Mir

Code review comment for lp:~vanvugt/mir/test-pkgconfig

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Alan,

Yes it's an imperfect build-time test for the pkg-config source files *.pc.in

I think you're asking for a system test of the final released packages files. That's ideal, but also not necessary. I'm still testing real *.pc files here made from the same pc input text. The fact that the paths in the tested pc files are temporary ones isn't a bug but a feature. It allows us to test the correctness of our pkg-config within the build tree, before final installation. Although you could use the real pc files with a fake root into the build tree, the result is the same (albeit more awkward) than what's proposed here.

More importantly at the end of the exercise I came to realize that CMake's insertion of temporary hard-coded search paths (rpath) actually makes any build-time testing of *.pc insufficient either way. Because the build-time search paths are literally hacked out just before packaging (thanks CMake). So the results of final package testing could easily be different.

This proposal is a basic indication of major problems in *.pc.in but it won't catch everything. And for the reason just explained, even using the real *.pc output files in a fake root would be equally insufficient, unfortunately. You either have to test the final released packages (which we do later of course), or accept that what you're testing before packaging is not the same set of binaries with the same search paths as what is about to be released.

« Back to merge proposal