summaryrefslogtreecommitdiff
path: root/tests/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib18
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/lib b/tests/lib
index 7b17653..aec8612 100644
--- a/tests/lib
+++ b/tests/lib
@@ -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