xbps-src: implement a 'check' stage

Add another stage 'check' between 'build' and 'install'. It is be enabled using the
variable XBPS_CHECK_PKGS=yes and disabled if unset, set to "0" or "no" in your
local etc/conf.

A new xbps-src option `-q` for `quick` will disable XBPS_CHECK_PKGS by overriding it to 0.
If enabled, `common/xbps-src/shutils/xbps-src-docheck.sh` checks for an existing
`do_check()` function in the package's template and, if it exists, calls it.

A new template variable `checkdepends` may be present and list packages required
to run the `do_check()` function. Example: `checkdepends="bc unittest-cpp"`.
This commit is contained in:
Jürgen Buchmüller 2017-02-23 22:03:31 +01:00
parent f9dface61c
commit c31dd888f6
14 changed files with 156 additions and 13 deletions

View file

@ -63,6 +63,11 @@ XBPS_SUCMD="sudo /bin/sh -c"
#
#XBPS_USE_GIT_REVS=yes
# [OPTIONAL]
# Enable running the (optional) do_check() function of a package.
#
#XBPS_CHECK_PKGS=yes
# [OPTIONAL]
# Enable building -dbg subpackages with debugging symbols. Please note
# that building with debugging symbols make take a long while in some