chiark / gitweb /
Print better message for lack of configuration settings.
[dgit.git] / tests / lib
index 60abb90945611d440f25f61a8d8682fb8a076746..bba49a3f11e8d0dc92adcc3cbfcd1bfea0949e77 100644 (file)
--- 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 () {