X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;ds=sidebyside;f=tests%2Flib;h=cccdc35dd5a6c1d2e09816360fabc1ae605ffd6e;hb=40811280f014d238452e24619c946ecde6ec2c5a;hp=2dffdacee0f614fa22024fa3c6e515bc253aa22d;hpb=2ba1d04106ad92d32e7614ad9d94fce48c363076;p=dgit.git diff --git a/tests/lib b/tests/lib index 2dffdace..cccdc35d 100644 --- a/tests/lib +++ b/tests/lib @@ -3,6 +3,12 @@ exec 2>&1 set -x +if [ "x$DGIT_TEST_INTREE" != x ]; then + : ${DGIT_TEST:=$DGIT_TEST_INTREE/dgit} + : ${DGIT_REPOS_SERVER_TEST:=$DGIT_TEST_INTREE/dgit-repos-server} + export DGIT_TEST DGIT_REPOS_SERVER_TEST +fi + root=`pwd` troot=$root/tests testname="${DGIT_TEST_TESTNAME-${0##*/}}" @@ -82,30 +88,41 @@ t-archive-none () { echo sid >$tmp/aq/suite.unstable } +t-archive-process-incoming () { + mv incoming/${p}_${v}[._]* mirror/ + t-archive-query +} + +t-archive-query () { + local dscf=${p}_${v}.dsc + echo "${v} $dscf" >>$tmp/aq/package.sid.${p} +} + t-archive () { t-archive-none $1 v=$2 local dscf=${p}_$2.dsc rm -f $tmp/mirror/${p}_* ln $troot/pkg-srcs/${p}_${2%-*}* $tmp/mirror/ - echo "$2 $dscf" >>$tmp/aq/package.sid.${p} + t-archive-query rm -rf $tmp/extract mkdir $tmp/extract (set -e; cd $tmp/extract; dpkg-source -x ../mirror/$dscf) } t-dgit () { + local dgit=${DGIT_TEST-dgit} : ' - {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{' - ${DGIT_TEST-dgit} --dget:-u --dput:--config=$tmp/dput.cf \ - -dtest-dummy $DGIT_TEST_OPTS -D -k39B13D8A "$@" + $dgit --dgit=$dgit --dget:-u --dput:--config=$tmp/dput.cf \ + -dtest-dummy $DGIT_TEST_OPTS ${DGIT_TEST_DEBUG--D} \ + -k39B13D8A "$@" : '}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} ' } t-diff-nogit () { - diff --exclude=.git -ruN $* + diff --exclude=.git --exclude=.pc -ruN $* } t-cloned-fetched-good () { @@ -241,6 +258,8 @@ t-drs () { t-git-config dgit-distro.test-dummy.git-url "ext::$troot/drs-git-ext %S " t-git-config dgit-distro.test-dummy.git-check true t-git-config dgit-distro.test-dummy.git-create true + cp $root/tests/gnupg/{dd.gpg,dm.gpg,dm.txt} $tmp/. + cp $root/tests/suites $tmp/. } t-drs-test () { @@ -248,7 +267,5 @@ t-drs-test () { cd $root export DGIT_TEST_TESTNAME="$testname" export ADTTMP=$tmp - cp $root/tests/gnupg/{dd.gpg,dm.gpg,dm.txt} $tmp/. - cp $root/tests/suites $tmp/. exec "${0///drs-//}" "$@" }