From: Ian Jackson Date: Thu, 12 Jul 2018 11:37:45 +0000 (+0100) Subject: test suite: Factor out t-dch-commit-r X-Git-Tag: archive/debian/5.9+exp1~5 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=a47f1af332372a372bf5758d1e3d9eeffe14acbd test suite: Factor out t-dch-commit-r 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 --- diff --git a/tests/lib b/tests/lib index 4ef275ca..04d1f2dc 100644 --- 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 diff --git a/tests/lib-gdr b/tests/lib-gdr index 22ea6d1f..95d2330e 100644 --- a/tests/lib-gdr +++ b/tests/lib-gdr @@ -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 diff --git a/tests/setup/gdr-convert-gbp b/tests/setup/gdr-convert-gbp index 8049d87c..d64b867c 100755 --- a/tests/setup/gdr-convert-gbp +++ b/tests/setup/gdr-convert-gbp @@ -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 diff --git a/tests/tests/gdr-diverge-nmu-dgit b/tests/tests/gdr-diverge-nmu-dgit index 4b5907a1..1d136a94 100755 --- a/tests/tests/gdr-diverge-nmu-dgit +++ b/tests/tests/gdr-diverge-nmu-dgit @@ -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 diff --git a/tests/tests/gdr-edits b/tests/tests/gdr-edits index 6c77184a..52c083b9 100755 --- a/tests/tests/gdr-edits +++ b/tests/tests/gdr-edits @@ -16,7 +16,7 @@ cat ../anal.1 t-some-changes edits -t-dch-commit -r sid +t-dch-commit-r git tag t.before diff --git a/tests/tests/gdr-import-dgit b/tests/tests/gdr-import-dgit index 19918d8b..c18c0976 100755 --- a/tests/tests/gdr-import-dgit +++ b/tests/tests/gdr-import-dgit @@ -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'