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:
parent
f9dface61c
commit
c31dd888f6
14 changed files with 156 additions and 13 deletions
|
@ -121,6 +121,8 @@ function, which is the directory to be used to compile the `source package`.
|
|||
|
||||
- `build` This phase compiles/prepares the `source files` via `make` or any other compatible method.
|
||||
|
||||
- `check` This optional phase checks the result of the `build` phase for example by running `make -k check`.
|
||||
|
||||
- `install` This phase installs the `package files` into the package destdir `<masterdir>/destdir/<pkgname>-<version>`,
|
||||
via `make install` or any other compatible method.
|
||||
|
||||
|
@ -359,6 +361,10 @@ will be installed to the master directory. There is no need to specify a version
|
|||
because the current version in srcpkgs will always be required.
|
||||
Example `makedepends="foo blah"`.
|
||||
|
||||
- `checkdepends` The list of dependencies required to run the package checks, i.e.
|
||||
the script or make rule specified in the template's `do_check()` function.
|
||||
Example `checkdepends="gtest"`.
|
||||
|
||||
- `depends` The list of dependencies required to run the package. These dependencies
|
||||
are not installed to the master directory, rather are only checked if a binary package
|
||||
in the local repository exists to satisfy the required version. Dependencies
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue