Make test binaries and test data installable#57
Conversation
Build gtest library as static, build tests with it and make test executables installable artifacts. Make test dataset used by the test binaries installable as well. Signed-off-by: Vladislav Dronov <vdronov@redhat.com>
Signed-off-by: Vladislav Dronov <vdronov@redhat.com>
|
Hi, i'm a developer adding the intel-qpl package to RedHat Linux per Intel request. I'm not sure if this change is needed here upsteam, so please feel free to drop this PR out. Still, RHEL (and probably other distributions) would want test binaries available as build artifacts to run them during their QE stage outside the build process. So, this PR suggests building gtest library as static, so not to conflict with a system gtest if present and to lock possibly outdated gtest lib inside test binaries. Then it is used to build test binaries (which have to be renamed: qpl-func-tests and qpl-cross-tests). Could you please consider this PR for a possible inclusion? Thank you. |
gbtucker
left a comment
There was a problem hiding this comment.
@nefigtut, we would like to do whatever is easier for maintainers but I'm not sure installing the tests by default is what most repos would want. Perhaps should leave for the disto-specific downstream stack or make optional with default off if that kind of patch is easier to maintain out-of-tree.
|
hei, @gbtucker, thanks for your reply. let me explain my point a bit (you probably know all that, but still). usually a build system asks a source code "make" process to "[c]make install" resulting binaries not into a real system, but to a so-called buildroot. then files from that buildroot are assembled into a (rpm/deb/etc) package. so for this assembly process a file should be in a buildroot already, not somewhere among the source and .o files. so my suggested patch does exactly this - allows test binaries to be [c]make-installed into a buildroot. after this a package assembly process can choose if it wants files in a buildroot to be packaged or skipped. also, it can decide to put certain files in another (sub)package. i'm going to do exactly this and put libqpl.so.1 into intel-qpl.rpm and put tests to a separate optional intel-qpl-tests.rpm. but again, for this to happen, files have to be in a buildroot, which my patch allows. but yes, i understand, for ones who build from sources this patch will bring unneeded tests into the system. so, please feel free to ignore this PR and close it. i'll just use it downstream. |
Build gtest library as static, build tests with it and make test
executables installable artifacts. Make test dataset used by the
test binaries installable as well. Also fix a small shebang issue.