X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=tests%2Flib;h=fcc2a69766e73b34a32b8ba0cdd1112893c1775f;hp=8fd35147431f884637c195ddde9ba41b34cfd58f;hb=54b427747f1491776db2cba723645dd437c3e606;hpb=c85ececfb4a825fe91cf45aa8ffae69863ace473 diff --git a/tests/lib b/tests/lib index 8fd35147..fcc2a697 100644 --- a/tests/lib +++ b/tests/lib @@ -37,6 +37,7 @@ export GIT_AUTHOR_DATE='1440253867 +0100' root=`pwd` troot=$root/tests testname="${DGIT_TEST_TESTNAME-${0##*/}}" +export DGIT_TEST_TROOT=$troot tmp=$ADTTMP if [ x"$tmp" = x ]; then @@ -359,9 +360,11 @@ t-expect-fsck-fail () { } t-git-fsck () { + local fsckerrs=$(git rev-parse --git-dir)/dgit-test-fsck.errs + set +e LC_MESSAGES=C git fsck --no-dangling --strict 2>&1 \ - | tee dgit-test-fsck.errs + | tee $fsckerrs ps="${PIPESTATUS[*]}" set -e @@ -375,7 +378,7 @@ t-git-fsck () { pats+=(-e 'notice: No default references') set +e - grep -v "${pats[@]}" dgit-test-fsck.errs + grep -v "${pats[@]}" $fsckerrs rc=$? set -e case $rc in @@ -984,7 +987,6 @@ t-git-config () { } t-drs () { - export DGIT_TEST_TROOT=$troot 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