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:
@@ -61,6 +61,10 @@ $XBPS_LIBEXECDIR/xbps-src-doconfigure.sh $SOURCEPKG $XBPS_CROSS_BUILD || exit 1
|
||||
$XBPS_LIBEXECDIR/xbps-src-dobuild.sh $SOURCEPKG $XBPS_CROSS_BUILD || exit 1
|
||||
[ "$XBPS_TARGET" = "build" ] && exit 0
|
||||
|
||||
# Run check phase
|
||||
$XBPS_LIBEXECDIR/xbps-src-docheck.sh $SOURCEPKG $XBPS_CROSS_BUILD || exit 1
|
||||
[ "$XBPS_TARGET" = "check" ] && exit 0
|
||||
|
||||
# Install pkgs into destdir.
|
||||
$XBPS_LIBEXECDIR/xbps-src-doinstall.sh $SOURCEPKG no $XBPS_CROSS_BUILD || exit 1
|
||||
|
||||
|
Reference in New Issue
Block a user