Discussion:
How to run the autoconf generated testsuite with `make installcheck`?
Simon Sobisch
2018-02-18 22:50:57 UTC
Permalink
While the automake manual mentions the installcheck target it doesn't
leave a note where to find more information about this.

I assume this is about something like:

* adding a installcheck-local target to tests/Makefile.am
* in this target run the check-local target but set an environment
variable before
* in tests/atlocal.in check for this variable and adjust the path of the
tested binaries to use no path at all (=use the ones found in PATH)

Is this the correct approach?

Thank you for providing some experience / best practice about the
installcheck target,

Simon
Mathieu Lirzin
2018-06-21 22:51:57 UTC
Permalink
Hello Simon,
Post by Simon Sobisch
While the automake manual mentions the installcheck target it doesn't
leave a note where to find more information about this.
* adding a installcheck-local target to tests/Makefile.am
* in this target run the check-local target but set an environment
variable before
* in tests/atlocal.in check for this variable and adjust the path of the
tested binaries to use no path at all (=use the ones found in PATH)
Is this the correct approach?
Thank you for providing some experience / best practice about the
installcheck target,
I don't have much experience with ‘installcheck’ target. I have used it
in GNU Mcron to check the location and basic properties of the installed
files [1].

I would recommend against running unit tests on the installed program
and reserve it for validation tests. For example verifying that default
paths values are properly set to the installed location which can't be
checked from ‘builddir’.

[1] https://git.savannah.gnu.org/cgit/mcron.git/tree/Makefile.am
--
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37
Loading...