diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-05-31 15:33:46 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-05-31 15:47:24 +0100 |
commit | 6b8c969adabf3b74d9deb836e5377a3e01c2a57b (patch) | |
tree | b0d4be057b746da5b6e065921793ba0c3400e7be | |
parent | 683b0eb026fa6b43cc0a9ae122764f9a5d031f59 (diff) |
Test suite: move t-commit and break out t-policy (nfc)
-rw-r--r-- | tests/lib | 18 | ||||
-rwxr-xr-x | tests/tests/debpolicy-newreject | 10 |
2 files changed, 16 insertions, 12 deletions
@@ -370,6 +370,15 @@ t-apply-diff () { | patch -p1 -u } +t-commit () { + local msg=$1 + v=1.$revision + dch -v$v --distribution unstable "$1" + git add debian/changelog + debcommit + revision=$(( $revision + 1 )) +} + t-git-config () { git config --global "$@" } @@ -414,16 +423,21 @@ t-policy-admin () { ${DGIT_INFRA_PFX}dgit-repos-admin-debian --repos $tmp/git "$@" } -t-debpolicy () { +t-policy () { + local policyhook=$1 t-dsd - ln -sf ${DGIT_INFRA_PFX}dgit-repos-policy-debian \ + ln -sf ${DGIT_INFRA_PFX}$policyhook \ $drs_dispatch/policy-hook mkdir $tmp/git t-policy-admin create-db } +t-debpolicy () { + t-policy dgit-repos-policy-debian +} + t-policy-periodic () { ${DGIT_REPOS_SERVER_TEST-dgit-repos-server} \ test-dummy $drs_dispatch '' --cron diff --git a/tests/tests/debpolicy-newreject b/tests/tests/debpolicy-newreject index e64ed6e..c1192d1 100755 --- a/tests/tests/debpolicy-newreject +++ b/tests/tests/debpolicy-newreject @@ -8,17 +8,7 @@ t-debpolicy t-prep-newpackage example 1.0 cd $p - revision=1 -t-commit () { - local msg=$1 - v=1.$revision - dch -v$v --distribution unstable "$1" - git add debian/changelog - debcommit - revision=$(( $revision + 1 )) -} - git tag start echo FORBIDDEN >debian/some-file |