summaryrefslogtreecommitdiff
path: root/tests/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib18
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/lib b/tests/lib
index 1179fb0..e81a62a 100644
--- a/tests/lib
+++ b/tests/lib
@@ -567,14 +567,20 @@ t-policy-nonexist () {
ln -sf no-such-file-or-directory $drs_dispatch/policy-hook
}
-t-policy () {
- local policyhook=$1
- policyhook=${DGIT_INFRA_PFX}$policyhook
- case $policyhook in
+t-make-hook-link () {
+ local hook=$1 # in infra/
+ local linkpath=$2
+ hook=${DGIT_INFRA_PFX}$hook
+ case $hook in
*/*) ;;
- *) policyhook=`type -P $policyhook` ;;
+ *) hook=`type -P $hook` ;;
esac
- ln -sf "$policyhook" $drs_dispatch/policy-hook
+ ln -sf "$hook" $linkpath
+}
+
+t-policy () {
+ local policyhook=$1
+ t-make-hook-link $policyhook $drs_dispatch/policy-hook
}
t-debpolicy () {