chiark / gitweb /
test suite: Factor out t-dch-commit-r
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 12 Jul 2018 11:37:45 +0000 (12:37 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 12 Jul 2018 12:43:08 +0000 (13:43 +0100)
The pattern `dch -r sid' is actually wrong and we will want to change
it.  See #903441 and #903598.  For future-proofing, factor this out
before we fix it.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/lib
tests/lib-gdr
tests/setup/gdr-convert-gbp
tests/tests/gdr-diverge-nmu-dgit
tests/tests/gdr-edits
tests/tests/gdr-import-dgit

index 4ef275ca1641f62804675c91ab1cf516b66d5692..04d1f2dc1019fbb60c67772d5a70edf2f4327030 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -1006,6 +1006,16 @@ t-commit () {
        revision=$(( ${revision-0} + 1 ))
 }
 
+t-dch-r-rune () {
+       local cmd="$1"; shift
+       local suite=${1-unstable}
+       $cmd -r sid
+}
+
+t-dch-commit-r () {
+       t-dch-r-rune t-dch-commit "$@"
+}
+
 t-dch-commit () {
        faketime @"${GIT_AUTHOR_DATE% *}" dch "$@"
        git commit -m "dch $*" debian/changelog
index 22ea6d1fa88bab61758b410d47dcd3bf2951652b..95d2330e17a60386b59ebd999a4f3703d5112bbb 100644 (file)
@@ -222,7 +222,7 @@ t-nmu-upload-2 () {
 }
 
 t-nmu-upload-3 () {
-       t-dch-commit -r sid
+       t-dch-commit-r
 
        t-dgit -wgf build-source
 
index 8049d87c099e8b7b2a8b7831befda00bc35c9c75..d64b867c66653482c1ae030df1a3ecbe0f0e1019 100755 (executable)
@@ -64,7 +64,7 @@ gbp import-orig --upstream-version=2.0 ../$ust
 not-gdr-processable
 
 t-dch-commit -v 2.0-1 -m 'new upstream (did gbp import-orig)'
-t-dch-commit -r sid
+t-dch-commit-r
 
 $ifarchive t-archive-none $p
 $ifarchive t-git-none
@@ -84,7 +84,7 @@ t-git-debrebase -fupstream-has-debian convert-from-gbp
 
 v=2.0-2
 t-dch-commit -v $v -m 'switch to git-debrebase, no other changes'
-t-dch-commit -r sid
+t-dch-commit-r
 
 $ifarchive t-dgit -wgf push-source --new
 git push
index 4b5907a1caafc13b49a0e676ce0037da651e5bb2..1d136a94b0bfb85751868d07417a72d7529b4c0b 100755 (executable)
@@ -28,7 +28,7 @@ t-git-next-date
 v=2.0-2+nmu1
 t-nmu-commit-an-upstream-change
 t-dch-commit -v$v -m finalise
-t-dch-commit -r sid
+t-dch-commit-r
 
 t-dgit -wgf push-source
 
index 6c77184a11058541a33b1661ef6c4cf65f036fb9..52c083b9fd427d1b9107735b654ad0c9451f5caf 100755 (executable)
@@ -16,7 +16,7 @@ cat ../anal.1
 
 t-some-changes edits
 
-t-dch-commit -r sid
+t-dch-commit-r
 
 git tag t.before
 
index 19918d8bc5e546fea77e7a9803231da20c2ae731..c18c0976f9f60dd9d5b01fd2df47ba06b5a4c85e 100755 (executable)
@@ -40,7 +40,7 @@ nmu-fold
 
 v=2.0-3
 t-dch-commit -v $v -m "incorporate nmu"
-t-dch-commit -r sid
+t-dch-commit-r
 t-dgit -wgf push-source
 
 : 'now test a new upstream'