# export DEB_ADT_SUMMARY=$(mktemp /var/tmp/$PACKAGE.XXXXXX.xml)
# sbuild --finished-build-commands='adt-sbuild %SBUILD_BUILD_DIR %SBUILD_PKGBUILD_DIR' ...
+# Input:
+# %SBUILD_BUILD_DIR %SBUILD_PKGBUILD_DIR
+# DEB_ADT_SUMMARY (possibly unset)
+# DEB_PG_SUPPORTED_VERSIONS (required)
+# Output:
+# xml test results (or dummy result) in DEB_ADT_SUMMARY
+# Requirements:
+# sudo DEB_PG_SUPPORTED_VERSIONS=value adt-run
+
if [ -z "$DEB_ADT_SUMMARY" ]; then
echo "DEB_ADT_SUMMARY is not set, skipping tests"
exit
(
set -x
-sudo adt-run --summary $ADT_SUMMARY \
+sudo DEB_PG_SUPPORTED_VERSIONS="$DEB_PG_SUPPORTED_VERSIONS"
+ adt-run --summary $ADT_SUMMARY \
$SBUILD_BUILD_DIR/*.deb \
--built-tree $SBUILD_PKGBUILD_DIR \
--- adt-virt-null
# JOB_NAME=$pkg-binaries
# architecture=amd64/i386
# distribution=foo (caveat: sbuild -d foo-pgdg will be called)
+# DEB_PG_SUPPORTED_VERSIONS (optional, defaults to pgdg)
# Output:
# .changes and .deb in current directory
# autopkgtest.xml in current directory
fi ;;
esac
+# set DEB_PG_SUPPORTED_VERSIONS
+: ${DEB_PG_SUPPORTED_VERSIONS:=pgdg}
+export DEB_PG_SUPPORTED_VERSIONS
+
# prepare temp file for adt-run results
export DEB_ADT_SUMMARY=$(mktemp /var/tmp/$PACKAGE.XXXXXX.xml)
cleanup () {
# build package and run autopkgtests inside the chroot
(
+ echo "Bulding $PACKAGE (DEB_PG_SUPPORTED_VERSIONS=$DEB_PG_SUPPORTED_VERSIONS)"
set -x
flock --shared 9
sbuild --nolog --batch \