chiark / gitweb /
Test suite: import-tarbomb: Split out from import-nonnative
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 7 Nov 2016 23:53:46 +0000 (23:53 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 8 Nov 2016 00:19:56 +0000 (00:19 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/tests/control
tests/tests/import-nonnative
tests/tests/import-tarbomb [new file with mode: 0755]

index cf37ca7..4ed5327 100644 (file)
@@ -25,7 +25,7 @@ Tests-Directory: tests/tests
 Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, make
 Restrictions: x-dgit-git-only
 
-Tests: absurd-gitapply build-modes build-modes-asplit build-modes-gbp-asplit clone-clogsigpipe clone-gitnosuite clone-nogit debpolicy-dbretry debpolicy-newreject debpolicy-quilt-gbp distropatches-reject drs-clone-nogit drs-push-masterupdate drs-push-rejects dsd-clone-nogit dsd-divert fetch-localgitonly fetch-somegit-notlast gbp-orig gitconfig import-dsc import-native import-nonnative inarchivecopy mismatches-contents mismatches-dscchanges multisuite newtag-clone-nogit oldnewtagalt oldtag-clone-nogit orig-include-exclude orig-include-exclude-chkquery overwrite-chkclog overwrite-junk overwrite-splitbrains overwrite-version push-buildproductsdir push-newpackage push-nextdgit quilt quilt-gbp quilt-gbp-build-modes quilt-singlepatch quilt-splitbrains rpush tag-updates test-list-uptodate trustingpolicy-replay unrepresentable version-opt
+Tests: absurd-gitapply build-modes build-modes-asplit build-modes-gbp-asplit clone-clogsigpipe clone-gitnosuite clone-nogit debpolicy-dbretry debpolicy-newreject debpolicy-quilt-gbp distropatches-reject drs-clone-nogit drs-push-masterupdate drs-push-rejects dsd-clone-nogit dsd-divert fetch-localgitonly fetch-somegit-notlast gbp-orig gitconfig import-dsc import-native import-nonnative import-tarbomb inarchivecopy mismatches-contents mismatches-dscchanges multisuite newtag-clone-nogit oldnewtagalt oldtag-clone-nogit orig-include-exclude orig-include-exclude-chkquery overwrite-chkclog overwrite-junk overwrite-splitbrains overwrite-version push-buildproductsdir push-newpackage push-nextdgit quilt quilt-gbp quilt-gbp-build-modes quilt-singlepatch quilt-splitbrains rpush tag-updates test-list-uptodate trustingpolicy-replay unrepresentable version-opt
 Tests-Directory: tests/tests
 Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, make
 
index fa9b74b..d324172 100755 (executable)
@@ -14,45 +14,4 @@ t-import-chk example 1.0-1
 # 3.0 (quilt), single-debian-patch, one orig
 t-import-chk sunxi-tools 1.2-2.~~dgittest
 
-mangle1 () {
-       rm -f ${1}_*
-       t-import-chk1 "$@"
-       cd $tmp/mirror/pool/main
-       dpkg-source -x ${p}_${v}.dsc td
-       orig=${p}_${v%-*}.orig.tar.gz
-       tar zxf $orig
-       rm $orig ${p}_${v}.*
-       cd $p
-       mkdir urk
-       echo urk >urk/urk
-       export GZIP=-1
-}
-mangle2 () {
-       cd ..
-       dpkg-source -b td
-       rm -rf $p td
-       cd $tmp
-       t-archive-none $p
-       t-archive-query
-       t-import-chk2
-}
-
-# 3.0 (quilt), multiple patches, tarbomb orig
-mangle1 example 1.0-1
-tar zvcf ../$orig *
-mangle2
-
-# 3.0 (quilt), multiple patches, tarbomb orig with dot
-mangle1 example 1.0-1
-tar zvcf ../$orig .
-mangle2
-
-# 3.0 (quilt), multiple patches, tarbomb orig with dot and .git and .pc
-mangle1 example 1.0-1
-git init
-mkdir .pc
-echo SPONG >.pc/SPONG
-tar zvcf ../$orig .
-mangle2
-
 echo done.
diff --git a/tests/tests/import-tarbomb b/tests/tests/import-tarbomb
new file mode 100755 (executable)
index 0000000..c0bc4c4
--- /dev/null
@@ -0,0 +1,49 @@
+#!/bin/bash
+set -e
+. tests/lib
+. $troot/lib-import-chk
+
+t-tstunt-parsechangelog
+
+mangle1 () {
+       rm -f ${1}_*
+       t-import-chk1 "$@"
+       cd $tmp/mirror/pool/main
+       dpkg-source -x ${p}_${v}.dsc td
+       orig=${p}_${v%-*}.orig.tar.gz
+       tar zxf $orig
+       rm $orig ${p}_${v}.*
+       cd $p
+       mkdir urk
+       echo urk >urk/urk
+       export GZIP=-1
+}
+mangle2 () {
+       cd ..
+       dpkg-source -b td
+       rm -rf $p td
+       cd $tmp
+       t-archive-none $p
+       t-archive-query
+       t-import-chk2
+}
+
+# 3.0 (quilt), multiple patches, tarbomb orig
+mangle1 example 1.0-1
+tar zvcf ../$orig *
+mangle2
+
+# 3.0 (quilt), multiple patches, tarbomb orig with dot
+mangle1 example 1.0-1
+tar zvcf ../$orig .
+mangle2
+
+# 3.0 (quilt), multiple patches, tarbomb orig with dot and .git and .pc
+mangle1 example 1.0-1
+git init
+mkdir .pc
+echo SPONG >.pc/SPONG
+tar zvcf ../$orig .
+mangle2
+
+echo done.