Implemented as follows:
* build-and-provide-package uses the new pbuilder-hookdir directory
by default. The pbuilder-hookdir script B20autopkgtest runs the
actual tests using autopkgtest iff debian/tests/control is
present in the Debian package, otherwise skipping the test
execution so behaviour of build-and-provide-package is the
same as before.
The hook directory defaults to /usr/share/jenkins-debian-glue/pbuilder-hookdir/
and can be configured by the $PBUILDER_HOOKDIR setting.
To skip any autopkgtest output handling the $SKIP_AUTOPKGTEST_RESULTS
configuration can be set.
* build-and-provide-package: copies autopkgtest output into
directory 'adt' for later processing via adtsummary_tap
* adtsummary_tap: this script generates a TAP report of
the autopkgtest output, usage inside a Jenkins job as shell
executer step like:
mkdir -p report adt
touch adt/summary # do not fail if no autopkgtest run took place
adtsummary_tap adt/summary > report/autopkgtest.tap
and using 'report/*.tap' for Post-build action "Publish TAP Results".
It's recommended to use a recent version of autopkgtest. The
one provided by Christoph Berg <myon@debian.org> at
http://apt.postgresql.org/pub/repos/apt/pool/main/a/autopkgtest/
(autopkgtest_2.2.3.pgdg+1 at the time of this commit)
is known to work fine and also includes a bugfix for:
| TypeError: coercing to Unicode: need string or buffer, instance found
which is reported as http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=696625
Please note that autopkgtest isn't required on the system providing
cowbuilder but instead *inside* the cowbuilder environment.
Thanks to Christoph Berg <myon@debian.org> for his initial work on
autopkgtest support in jenkins-debian-glue and his permission to
integrate it in the mainline project.
Build-Depend on shunit2 since an according test script
verifies that all supported version numbers work as
intended.
generate-svn-snapshot has been adapted to use
increase-version-number accordingly.