chiark / gitweb /
test suite: debpolicy-taintrm: New test
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 1 Jul 2019 12:36:36 +0000 (13:36 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 1 Jul 2019 12:36:36 +0000 (13:36 +0100)
Closes: #929249
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/tests/control
tests/tests/debpolicy-taintrm [new file with mode: 0755]

index 82b99b14379edb500c892ce744c19936b28258b5..2b495accf219fda8f06ae36e972f45d0b34f64fc 100644 (file)
@@ -72,7 +72,7 @@ Tests: trustingpolicy-replay
 Tests-Directory: tests/tests
 Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, faketime, dput-ng
 
-Tests: absurd-gitapply badcommit-rewrite build-modes build-modes-long build-modes-source checkout clone-clogsigpipe clone-gitnosuite clone-nogit debpolicy-dbretry debpolicy-newreject debpolicy-quilt-gbp defdistro-rpush defdistro-setup distropatches-reject dpkgsourceignores-correct drs-clone-nogit drs-push-masterupdate drs-push-rejects dsd-clone-nogit dsd-divert fetch-localgitonly fetch-somegit-notlast forcesplit-linear forcesplit-overwrite gbp-orig gitconfig gitworktree import-dsc import-linkorigs import-maintmangle import-native import-nonnative import-tarbomb inarchivecopy mismatches-contents mismatches-dscchanges multisuite orig-include-exclude orig-include-exclude-chkquery overwrite-chkclog overwrite-junk overwrite-splitbrains overwrite-version pbuilder protocol-compat push-buildproductsdir push-newpackage push-newrepeat push-nextdgit push-source push-source-with-changes quilt quilt-gbp quilt-gbp-build-modes quilt-singlepatch quilt-splitbrains quilt-useremail rpush rpush-quilt sourceonlypolicy tag-updates unrepresentable version-opt
+Tests: absurd-gitapply badcommit-rewrite build-modes build-modes-long build-modes-source checkout clone-clogsigpipe clone-gitnosuite clone-nogit debpolicy-dbretry debpolicy-newreject debpolicy-quilt-gbp debpolicy-taintrm defdistro-rpush defdistro-setup distropatches-reject dpkgsourceignores-correct drs-clone-nogit drs-push-masterupdate drs-push-rejects dsd-clone-nogit dsd-divert fetch-localgitonly fetch-somegit-notlast forcesplit-linear forcesplit-overwrite gbp-orig gitconfig gitworktree import-dsc import-linkorigs import-maintmangle import-native import-nonnative import-tarbomb inarchivecopy mismatches-contents mismatches-dscchanges multisuite orig-include-exclude orig-include-exclude-chkquery overwrite-chkclog overwrite-junk overwrite-splitbrains overwrite-version pbuilder protocol-compat push-buildproductsdir push-newpackage push-newrepeat push-nextdgit push-source push-source-with-changes quilt quilt-gbp quilt-gbp-build-modes quilt-singlepatch quilt-splitbrains quilt-useremail rpush rpush-quilt sourceonlypolicy tag-updates unrepresentable version-opt
 Tests-Directory: tests/tests
 Depends: dgit, dgit-infrastructure, devscripts, debhelper (>=8), fakeroot, build-essential, chiark-utils-bin, bc, faketime
 
diff --git a/tests/tests/debpolicy-taintrm b/tests/tests/debpolicy-taintrm
new file mode 100755 (executable)
index 0000000..9225148
--- /dev/null
@@ -0,0 +1,58 @@
+#!/bin/bash
+set -e
+. tests/lib
+
+t-tstunt-parsechangelog
+
+t-debpolicy
+t-prep-newpackage example 1.0
+
+cd $p
+revision=1
+git tag start
+t-dgit setup-mergechangelogs
+
+
+: upload
+
+t-dgit push-source --new
+
+: cut
+
+rm $tmp/incoming/*
+t-archive-none example
+
+touch -d 'now -1 day' $tmp/git/example*
+
+t-policy-periodic # xxx maybe want test both with and without this
+
+: edit
+t-commit 'edit after cut'
+
+: push, needs --deliberately
+
+t-expect-push-fail \
+ 'all previously pushed versions were found to have been removed from NEW' \
+t-dgit push-source --new
+
+t-dgit push-source --new --deliberately-include-questionable-history
+
+t-archive-process-incoming new
+
+: t-policy-periodic # xxx maybe want test both with and without this
+
+: accept
+
+mv -f $tmp/aq/package.{new,sid}.$p
+t-aq-archive-updated sid $p
+
+: t-policy-periodic # xxx maybe want test both with and without this
+
+t-git-dir-time-passes
+
+: 3rd push, no deliberately
+
+t-commit 'edit after accept'
+t-dgit push-source
+
+t-ok