chiark / gitweb /
Test suite: orig-include-exclude: Tests orig auto-inclusion/exclusion
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 22 Oct 2016 23:17:16 +0000 (00:17 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 30 Oct 2016 16:36:20 +0000 (16:36 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/tests/control
tests/tests/orig-include-exclude [new file with mode: 0755]

index b4c278d..f1bdef1 100644 (file)
@@ -21,7 +21,7 @@ Tests-Directory: tests/tests
 Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8)
 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 gitconfig import-native import-nonnative inarchivecopy mismatches-contents mismatches-dscchanges newtag-clone-nogit oldnewtagalt oldtag-clone-nogit 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 gitconfig import-native import-nonnative inarchivecopy mismatches-contents mismatches-dscchanges newtag-clone-nogit oldnewtagalt oldtag-clone-nogit orig-include-exclude 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)
 
diff --git a/tests/tests/orig-include-exclude b/tests/tests/orig-include-exclude
new file mode 100755 (executable)
index 0000000..12478f3
--- /dev/null
@@ -0,0 +1,45 @@
+#!/bin/bash
+set -e
+. tests/lib
+
+t-tstunt-parsechangelog
+
+t-archive example 1.0-1
+t-git-none
+
+t-dgit clone $p
+
+for o in orig orig-docs; do
+       cp ${p}_{1.0,1.1}.${o}.tar.gz
+done
+
+cd $p
+
+v=1.0-2
+t-commit $v $v
+t-dgit --ch:-sa build
+
+grep orig ../${p}_${v}_*.changes
+
+t-dgit --ch:-sa push
+
+# check that dgit stripped out the orig update
+find $tmp/mirror -name '*orig*' -ls >../before
+t-archive-process-incoming sid
+find $tmp/mirror -name '*orig*' -ls >../after
+diff -u ../before ../after
+
+t-commit 'Some update' 1.1-1.2
+t-dgit --ch:-sd build
+t-dgit --ch:-sd push
+
+t-archive-process-incoming sid
+
+cd ..
+mkdir get
+cd get
+
+t-dgit clone $p
+# ^ checks that all the origs are there, ie that dgit added the origs
+
+echo done.