From: Ian Jackson Date: Sun, 19 Apr 2015 14:56:47 +0000 (+0100) Subject: Test suite: break out t-prep-newpackage (nfc) X-Git-Tag: debian/0.30~227 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=a34850cd18a1e8f163f3dda9c8fb6272706a8ea0;hp=475e31b775275ac895e21afa4143c10596b512d1 Test suite: break out t-prep-newpackage (nfc) --- diff --git a/tests/lib b/tests/lib index 1516646f..939aa6c6 100644 --- a/tests/lib +++ b/tests/lib @@ -81,7 +81,20 @@ t-has-ancestor () { if [ x$mbase != x$ancestor ]; then fail "not ff $ancestor..$now, $mbase != $ancestor" fi -} +} + +t-prep-newpackage () { + p=$1 + v=$2 + t-archive-none $p + t-git-none + v=3-1 + t-worktree $v + cd $p + git branch -m dgit/sid master + git remote rm dgit + cd .. +} t-archive-none () { p=$1 diff --git a/tests/tests/push-newpackage b/tests/tests/push-newpackage index 9954b3fc..5d23faa8 100755 --- a/tests/tests/push-newpackage +++ b/tests/tests/push-newpackage @@ -2,14 +2,9 @@ set -e . tests/lib -t-archive-none pari-extra -t-git-none -t-worktree 3-1 -v=3-1 -cd $p -git branch -m dgit/sid master -git remote rm dgit +t-prep-newpackage pari-extra 3-1 +cd $p t-refs-same-start t-ref-head