X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=tests%2Flib;h=2607ca2face2f67b9c04c6b232ca1b6413be37ee;hp=a4932d335cd36109a440c46ad9156a812d436616;hb=8463d12b7a99e449198b06341a96fb3504074040;hpb=ac92d3b15e0baf0d1634efc86c8919acb44bafa6 diff --git a/tests/lib b/tests/lib index a4932d33..2607ca2f 100644 --- a/tests/lib +++ b/tests/lib @@ -28,6 +28,8 @@ t-set-intree : ${DGIT_TEST_DEBUG=-D} export DGIT_TEST_DEBUG +: ${DGIT_TEST_DISTRO+ ${distro=${DGIT_TEST_DISTRO}}} + export GIT_COMMITTER_DATE='1440253867 +0100' export GIT_AUTHOR_DATE='1440253867 +0100' @@ -51,6 +53,7 @@ tmp=`pwd` t-set-using-tmp +test -f $tmp/.save-env || \ env -0 >$tmp/.save-env ln -f $troot/ssh ssh @@ -392,6 +395,7 @@ t-fscks () { } t-ok () { + : '========================================' t-fscks echo ok. } @@ -406,6 +410,7 @@ t-dgit () { : ' {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{' $dgit --dgit=$dgit --dget:-u --dput:--config=$tmp/dput.cf \ + ${dgit_config_debian_alias-"--config-lookup-explode=dgit-distro.debian.alias-canon"} \ ${distro--dtest-dummy} ${distro+${distro:+-d}${distro}} \ $DGIT_TEST_OPTS $DGIT_TEST_DEBUG \ -k39B13D8A $t_dgit_xopts "$@" @@ -776,6 +781,11 @@ t-822-field () { ' <$file } +t-defdistro () { + export DGIT_TEST_DISTRO='' + t-git-config dgit-suite.unstable.distro test-dummy +} + t-stunt-envvar () { local var=$1 local tstunt=$2 @@ -799,7 +809,14 @@ t-tstunt--save-real () { local rc local real set +e - real=$(type -p "$f") + real=$( + p=":$PATH:" + p="${p/:"$tmp/tstunt":/:}" + p="${p%:}" + p="${p#:}" + PATH="$p" + type -p "$f" + ) rc=$? set -e @@ -1007,7 +1024,9 @@ t-dsd () { } t-policy-admin () { + : '((((((((((((((((((((((((((((((((((((((((' ${DGIT_INFRA_PFX}dgit-repos-admin-debian --repos $tmp/git "$@" + : '))))))))))))))))))))))))))))))))))))))))' } t-policy-nonexist () { @@ -1039,8 +1058,10 @@ t-debpolicy () { } t-policy-periodic () { + : '((((((((((((((((((((((((((((((((((((((((' ${DGIT_REPOS_SERVER_TEST-dgit-repos-server} \ test-dummy $drs_dispatch '' --cron + : '))))))))))))))))))))))))))))))))))))))))' } t-restrict () {