summaryrefslogtreecommitdiffstats
path: root/doc/PKGBUILD.5.txt
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2010-12-16 00:06:43 +1000
committerDan McGee <dan@archlinux.org>2010-12-29 19:28:00 -0600
commit0c29eb431a26467fc5ec14742cfcdc7ce3558334 (patch)
tree282a6284582e2b0dd21656cd990bddd5f6e993b0 /doc/PKGBUILD.5.txt
parentd22777146446ecaf8b4b9c0afd593d23c5c9766e (diff)
downloadpacman-0c29eb431a26467fc5ec14742cfcdc7ce3558334.tar.xz
makepkg: Add check() function for running test suites
A PKGBUILD can have an option check() function for running test suites between the build() and package() stages. This function is run by default but can be disabled globally in with "!check" in BUILDENV in makepkg.conf. This setting can be controlled on an individual package basis using makepkg's --check and --nocheck flags. Addition dependencies needed for running the test suite can be specified in the checkdepends array and are only checked when running the check() function. Original-work-by: Jeff C <jeff@kcaccess.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'doc/PKGBUILD.5.txt')
-rw-r--r--doc/PKGBUILD.5.txt16
1 files changed, 15 insertions, 1 deletions
diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt
index 3d3909ac..2ccf0b2e 100644
--- a/doc/PKGBUILD.5.txt
+++ b/doc/PKGBUILD.5.txt
@@ -156,6 +156,12 @@ name. The syntax is: `source=('filename::url')`.
needed at runtime. Packages in this list follow the same format as
depends.
+*checkdepends (array)*::
+ An array of packages that this package depends on to run its test suite,
+ but are not needed at runtime. Packages in this list follow the same
+ format as depends. These dependencies are only considered when the
+ check() function is present and is to be run by makepkg.
+
*optdepends (array)*::
An array of packages (and accompanying reasons) that are not essential for
base functionality, but may be necessary to make full use of the contents
@@ -263,10 +269,18 @@ If you create any variables of your own in the build function, it is
recommended to use the bash `local` keyword to scope the variable to inside
the build function.
+check() Function
+----------------
+An optional check() function can be specified in which a packages test-suite
+may be run. This function is run between the build() and package() functions.
+The function is run in `bash -e` mode, meaning any command that exits with a
+non-zero status will cause the function to exit. Be sure any exotic commands
+used are covered by `checkdepends`.
+
package() Function
------------------
An optional package() function can be specified in addition to the build()
-function. This function is run immediately after the build() function. The
+function. This function is run after the build() and check() functions. The
function is run in `bash -e` mode, meaning any command that exits with a
non-zero status will cause the function to exit. When specified in combination
with the fakeroot BUILDENV option in linkman:makepkg.conf[5], fakeroot usage