Set DEB_PG_SUPPORTED_VERSIONS
authorChristoph Berg <myon@debian.org>
Sat, 3 Oct 2015 15:33:00 +0000 (17:33 +0200)
committerChristoph Berg <myon@debian.org>
Sat, 3 Oct 2015 15:33:00 +0000 (17:33 +0200)
jenkins/adt-sbuild
jenkins/sbuild-package

index aca4addc5267f805a401ac4bc942ed1c08e06036..17e142cc2d78d39a71646579ed052349095de9e9 100755 (executable)
@@ -4,6 +4,15 @@
 # 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
@@ -36,7 +45,8 @@ trap "rm -f $ADT_SUMMARY" 0 2 3 15
 
 (
 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
index 24b9c18f20e19b6235fee20faede200f1e1561a0..a4501fd7cc44c40d1d4a1573be0e9bef9fb43921 100755 (executable)
@@ -6,6 +6,7 @@
 #  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
@@ -57,6 +58,10 @@ case $architecture in
     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 () {
@@ -75,6 +80,7 @@ umask 002
 
 # 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 \