From: Ian Jackson Date: Tue, 23 Jun 2015 12:21:35 +0000 (+0100) Subject: Test suite: Make t-policy more robust, and work in installed-package mode X-Git-Tag: debian/0.30~61 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=62eaf578fb1af468b02c455db65bf93b3422ba49 Test suite: Make t-policy more robust, and work in installed-package mode --- diff --git a/tests/lib b/tests/lib index ef2437b0..30fce38e 100644 --- a/tests/lib +++ b/tests/lib @@ -518,8 +518,12 @@ t-policy-admin () { t-policy () { local policyhook=$1 - ln -sf ${DGIT_INFRA_PFX}$policyhook \ - $drs_dispatch/policy-hook + policyhook=${DGIT_INFRA_PFX}$policyhook + case $policyhook in + */*) ;; + *) policyhook=`type -P $policyhook` ;; + esac + ln -sf "$policyhook" $drs_dispatch/policy-hook } t-debpolicy () {