X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=tests%2Flib;h=e710f39dc660f8d1d065a3c46c08d5fb93449f19;hb=76cbbc78a07e44b4c917bbaa93bf7cd602387082;hp=22ae0ff5052a9f349319fc22ffec6ea09b8f1eff;hpb=68ace2786dc26749014ea70a6ebb2b896b1f25d1;p=dgit.git diff --git a/tests/lib b/tests/lib index 22ae0ff5..e710f39d 100644 --- a/tests/lib +++ b/tests/lib @@ -34,6 +34,8 @@ mkdir -p $tmp/gnupg cp $troot/gnupg/* $tmp/gnupg chmod go-rw $tmp/gnupg/* +export DEBCHANGE_VENDOR=dpkg + mkdir -p $tmp/incoming cat <$tmp/dput.cf [test-dummy] @@ -155,7 +157,7 @@ t-prep-newpackage () { t-git-none t-worktree $v cd $p - if ! git-show-ref --verify --quiet refs/heads/master; then + if ! git show-ref --verify --quiet refs/heads/master; then git branch -m dgit/sid master git remote rm dgit fi @@ -514,10 +516,18 @@ t-policy-admin () { ${DGIT_INFRA_PFX}dgit-repos-admin-debian --repos $tmp/git "$@" } +t-policy-nonexist () { + ln -sf no-such-file-or-directory $drs_dispatch/policy-hook +} + 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 () {