X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=tests%2Flib;h=bba49a3f11e8d0dc92adcc3cbfcd1bfea0949e77;hp=60abb90945611d440f25f61a8d8682fb8a076746;hb=282db732c877da890e55e5664e43636f8a9647ad;hpb=0c10b5f444e5eb50dcf801a6a3a8aa10b3ad561b diff --git a/tests/lib b/tests/lib index 60abb909..bba49a3f 100644 --- a/tests/lib +++ b/tests/lib @@ -39,16 +39,27 @@ fail () { exit 1 } +t-untar () { + local tarfile=$1.tar + local edittree=$1.edit + if test -d "$edittree"; then + cp -al "$edittree"/* . + else + tar xf "$tarfile" + fi +} + t-worktree () { rm -rf $p - tar xf $troot/worktrees/${p}_$1.tar + t-untar $troot/worktrees/${p}_$1 } t-git () { p=$1 v=$2 mkdir -p $tmp/git - (set -e; cd $tmp/git; tar xf $troot/git-srcs/${p}_$v.git.tar) + local gs=$troot/git-srcs/${p}_$v.git + (set -e; cd $tmp/git; t-untar $gs) } t-git-none () { @@ -88,7 +99,8 @@ t-dgit () { {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{' ${DGIT_TEST-dgit} --dget:-u --dput:--config=$tmp/dput.cf \ - -dtest-dummy $DGIT_TEST_OPTS -D -k39B13D8A "$@" + -dtest-dummy $DGIT_TEST_OPTS ${DGIT_TEST_DEBUG--D} \ + -k39B13D8A "$@" : '}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} ' } @@ -230,6 +242,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 () {