chiark / gitweb /
autopkgtests: do fetch of new version too
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 17 Nov 2013 14:52:57 +0000 (14:52 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 24 Nov 2013 17:45:26 +0000 (17:45 +0000)
tests/lib
tests/pkg-srcs/pari-extra_3-2~dummy1.diff.gz [new file with mode: 0644]
tests/pkg-srcs/pari-extra_3-2~dummy1.dsc [new file with mode: 0644]
tests/tests/clone-nogit

index baf3e46..5ce17d6 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -1,6 +1,7 @@
 #
 
 exec 2>&1
+set -x
 
 root=`pwd`
 troot=$root/tests
@@ -22,33 +23,44 @@ mkdir $tmp/gnupg
 export GNUPGHOME=$tmp/gnupg
 
 t-git () {
-       mkdir -p git
+       mkdir -p $tmp/git
        cp -al $troot/git-srcs/$1 git/.
 }
 
 t-git-none () {
-       mkdir -p git
+       mkdir -p $tmp/git
 }
 
 t-archive () {
        p=$1
-       mkdir -p aq mirror
+       v=$2
+       mkdir -p $tmp/aq $tmp/mirror
        local dscf=${p}_$2.dsc
-       ln $troot/pkg-srcs/${p}_${2%-*}* mirror/
-       echo sid >aq/suite.unstable
-       echo "$2 $dscf" >>aq/package.sid.${p}
-       mkdir extract
-       (set -e; cd extract; dpkg-source -x ../mirror/$dscf)
+       rm -f $tmp/mirror/${p}_*
+       ln $troot/pkg-srcs/${p}_${2%-*}* $tmp/mirror/
+       echo sid >$tmp/aq/suite.unstable
+       echo "$2 $dscf" >>$tmp/aq/package.sid.${p}
+       rm -rf $tmp/extract
+       mkdir $tmp/extract
+       (set -e; cd $tmp/extract; dpkg-source -x ../mirror/$dscf)
 }
 
 t-dgit () {
-       ${DGIT_TEST-dgit} --dget:-u -dtest-dummy "$@"
+       : '{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{'
+       ${DGIT_TEST-dgit} --dget:-u -dtest-dummy -D "$@"
+       : '}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}'
 }
 
 t-diff-nogit () {
        diff --exclude=.git -ruN $*
 }
 
+t-cloned-fetched-good () {
+       t-diff-nogit ../extract/$p-${v%-*} .
+       t-clean-on-branch dgit/sid
+       t-refs-same HEAD remotes/dgit/dgit/sid
+}
+
 t-output () {
        printf "%s\n" "$1" >$tmp/t.want
        shift
diff --git a/tests/pkg-srcs/pari-extra_3-2~dummy1.diff.gz b/tests/pkg-srcs/pari-extra_3-2~dummy1.diff.gz
new file mode 100644 (file)
index 0000000..f5dff2b
Binary files /dev/null and b/tests/pkg-srcs/pari-extra_3-2~dummy1.diff.gz differ
diff --git a/tests/pkg-srcs/pari-extra_3-2~dummy1.dsc b/tests/pkg-srcs/pari-extra_3-2~dummy1.dsc
new file mode 100644 (file)
index 0000000..1042f09
--- /dev/null
@@ -0,0 +1,19 @@
+Format: 1.0
+Source: pari-extra
+Binary: pari-extra
+Architecture: all
+Version: 3-2~dummy1
+Maintainer: Bill Allombert <ballombe@debian.org>
+Standards-Version: 3.9.2.0
+Build-Depends: debhelper (>= 5), package-does-not-exist
+Package-List: 
+ pari-extra deb math optional
+Checksums-Sha1: 
+ ff281e103ab11681324b0c694dd3514d78436c51 121 pari-extra_3.orig.tar.gz
+ 810c43d186ad2552d65949acf4a065fcfc823636 2484 pari-extra_3-2~dummy1.diff.gz
+Checksums-Sha256: 
+ ac1ef39f9da80b582d1c0b2adfb09b041e3860ed20ddcf57a0e922e3305239df 121 pari-extra_3.orig.tar.gz
+ 41f47f24df7f50555f43549bd8377cce046750d29f69903e04b7fbfe396a0a73 2484 pari-extra_3-2~dummy1.diff.gz
+Files: 
+ 76bcf03be979d3331f9051aa88439b8b 121 pari-extra_3.orig.tar.gz
+ eff09e2ace409a150646c4994f17f800 2484 pari-extra_3-2~dummy1.diff.gz
index d73b826..709aa1f 100755 (executable)
@@ -7,9 +7,12 @@ t-archive pari-extra 3-1
 
 t-dgit clone $p
 
-t-diff-nogit extract/$p-3 $p
 cd $p
-t-clean-on-branch dgit/sid
-t-refs-same HEAD remotes/dgit/dgit/sid
+t-cloned-fetched-good
+
+t-archive pari-extra 3-2~dummy1
+
+t-dgit pull
+t-cloned-fetched-good
 
 echo ok