diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-09-26 01:14:22 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-09-26 01:36:40 +0100 |
commit | dddd5aa973ab883be5edae00c1f9659132f908ce (patch) | |
tree | fd0584735621442a360c265b560afc2e3d360cf1 | |
parent | 49aab29ee3e3a4aa77156b490fa1132b6eae3e1d (diff) |
Test suite: Test --overwrite (without VERSION)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rw-r--r-- | debian/tests/control | 2 | ||||
-rwxr-xr-x | tests/tests/overwrite-chkclog | 39 |
2 files changed, 40 insertions, 1 deletions
diff --git a/debian/tests/control b/debian/tests/control index 01182ac..8777c4b 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -21,7 +21,7 @@ Tests-Directory: tests/tests Depends: dgit, dgit-infrastructure, devscripts Restrictions: x-dgit-git-only -Tests: build-modes build-modes-asplit build-modes-gbp-asplit 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 inarchivecopy newtag-clone-nogit oldnewtagalt oldtag-clone-nogit 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 +Tests: build-modes build-modes-asplit build-modes-gbp-asplit 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 inarchivecopy newtag-clone-nogit oldnewtagalt oldtag-clone-nogit overwrite-chkclog 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 Tests-Directory: tests/tests Depends: dgit, dgit-infrastructure, devscripts diff --git a/tests/tests/overwrite-chkclog b/tests/tests/overwrite-chkclog new file mode 100755 index 0000000..25356a8 --- /dev/null +++ b/tests/tests/overwrite-chkclog @@ -0,0 +1,39 @@ +#!/bin/bash +set -e +. tests/lib + +t-setup-import examplegit + +cd example + +suite=stable + +t-commit 'No changes, just send to stable' '' stable + +t-dgit -wgf build + +t-expect-fail 'Perhaps debian/changelog does not mention' \ +t-dgit push --overwrite stable + +t-dgit setup-mergechangelogs + +t-expect-fail 'fix conflicts and then commit the result' \ +git merge dgit/dgit/stable + +git checkout master which +EDITOR=: git commit + +t-dgit -wgf build + +perl -i~ -pe 's/^(\w+ \(\S+)(\) stable)/$1+X$2/ if $.>1' debian/changelog +git add debian/changelog +git commit -m 'Break changelog' + +t-expect-fail 'Perhaps debian/changelog does not mention' \ +t-dgit push --overwrite stable + +git revert --no-edit 'HEAD^{/Break changelog}' + +t-dgit push --overwrite stable + +echo done. |