This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository pkg-perl-tools.

commit 0fc070c1f74937f2b4e6593458cf7ffddff3682d
Author: gregor herrmann <gre...@debian.org>
Date:   Sun Jun 26 14:30:41 2016 +0200

    examples/check-build: update to work with adt-run and autopkgtest.
---
 examples/check-build | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/examples/check-build b/examples/check-build
index 303482e..3462dba 100755
--- a/examples/check-build
+++ b/examples/check-build
@@ -84,20 +84,25 @@ fi
 echo
 
 if grep -q 'Testsuite: autopkgtest' debian/control; then
-       read -n 1 -p "adt-run? y/N " ADT
-       if [ "$ADT" = "y" ]; then
-               ADTLOG="${CHANGES%.changes}_adt-run.log"
+       read -n 1 -p "adt-run? y/N " AUTOPKGTEST
+       if [ "$AUTOPKGTEST" = "y" ]; then
+               AUTOPKGTESTLOG="${CHANGES%.changes}_autopkgtest.log"
                if [ -x /usr/bin/schroot ] && schroot -l | grep -q default; then
-                       ADT_VIRT_SERVER=schroot
-                       ADT_VIRT_SERVER_ARGS=default
-               elif [ -x /usr/share/autopkgtest/virt/qemu ] && \
+                       AUTOPKGTEST_VIRT_SERVER=schroot
+                       AUTOPKGTEST_VIRT_SERVER_ARGS=default
+               elif [ -x /usr/bin/adt-virt-qemu -o -x 
/usr/share/autopkgtest/virt/qemu ] && \
                        [ -e /var/lib/libvirt/images/adt.img ]; then
-                       ADT_VIRT_SERVER=adt-virt-qemu
-                       ADT_VIRT_SERVER_ARGS=/var/lib/libvirt/images/adt.img
+                       AUTOPKGTEST_VIRT_SERVER=qemu
+                       
AUTOPKGTEST_VIRT_SERVER_ARGS=/var/lib/libvirt/images/adt.img
                fi
-               if [ -n "$ADT_VIRT_SERVER" ]; then
-                       adt-run --changes $CHANGES --log-file="$ADTLOG" --- \
-                               $ADT_VIRT_SERVER $ADT_VIRT_SERVER_ARGS
+               if [ -n "$AUTOPKGTEST_VIRT_SERVER" ]; then
+                       if command -v autopkgtest >/dev/null; then
+                               autopkgtest $CHANGES 
--log-file="$AUTOPKGTESTLOG" -- \
+                                       $AUTOPKGTEST_VIRT_SERVER 
$AUTOPKGTEST_VIRT_SERVER_ARGS
+                       else
+                               adt-run --changes $CHANGES 
--log-file="$AUTOPKGTESTLOG" --- \
+                                       $AUTOPKGTEST_VIRT_SERVER 
$AUTOPKGTEST_VIRT_SERVER_ARGS
+                       fi
                        SUCCESS=$?
                        case $SUCCESS in
                                0)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/pkg-perl-tools.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to