chiark / gitweb /
test suite: protocol-compat: New test (wip)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 8 Jan 2017 23:20:11 +0000 (23:20 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 9 Jan 2017 02:20:09 +0000 (02:20 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/tests/control
tests/tests/protocol-compat [new file with mode: 0755]

index 49eefbca176ac8c88b3e5da936b5ac5c38462a38..3530d7ace0df6edfcafe9f0f29b35f2446afbdbb 100644 (file)
@@ -25,7 +25,7 @@ Tests-Directory: tests/tests
 Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential
 Restrictions: x-dgit-git-only
 
 Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential
 Restrictions: x-dgit-git-only
 
-Tests: absurd-gitapply badcommit-rewrite build-modes build-modes-asplit build-modes-gbp-asplit clone-clogsigpipe clone-gitnosuite clone-nogit debpolicy-dbretry debpolicy-newreject debpolicy-quilt-gbp distropatches-reject downstream-gitless 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: absurd-gitapply badcommit-rewrite build-modes build-modes-asplit build-modes-gbp-asplit clone-clogsigpipe clone-gitnosuite clone-nogit debpolicy-dbretry debpolicy-newreject debpolicy-quilt-gbp distropatches-reject downstream-gitless 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 protocol-compat 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, build-essential
 
 Tests-Directory: tests/tests
 Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential
 
diff --git a/tests/tests/protocol-compat b/tests/tests/protocol-compat
new file mode 100755 (executable)
index 0000000..47074d5
--- /dev/null
@@ -0,0 +1,40 @@
+#!/bin/bash
+set -e
+. tests/lib
+. $troot/lib-reprepro
+
+t-setup-import examplegit
+t-tstunt-parsechangelog
+
+prep () {
+       dscf=$tmp/mirror/pool/main/example_$v.dsc
+}
+
+check () {
+       t-archive-none $p
+       t-archive-query $suite
+
+       t-dgit clone $p stable $p.cloned
+       cd $p.cloned
+       t-ref-head
+
+       t-dgit import-dsc $dscf +imported
+       t-ref-same refs/heads/imported
+       cd ..
+}
+
+: ---------- older ----------
+
+suite=stable
+v=1.2
+
+prep
+
+perl -i -pe 's/^(Dgit: \w+).*/$1/' $dscf
+
+dgit_config_debian_alias='-cdgit-distro.debian.alias-canon=test-dummy'
+# old Dgit fields are supposed to mean Debian
+
+check
+
+#t-ok