chiark / gitweb /
test suite: lib: t-git-fsck: put dgit-test-fsck.errs in git dir
[dgit.git] / tests / lib
index 8fd35147431f884637c195ddde9ba41b34cfd58f..fcc2a69766e73b34a32b8ba0cdd1112893c1775f 100644 (file)
--- 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##*/}}"
 root=`pwd`
 troot=$root/tests
 testname="${DGIT_TEST_TESTNAME-${0##*/}}"
+export DGIT_TEST_TROOT=$troot
 
 tmp=$ADTTMP
 if [ x"$tmp" = x ]; then
 
 tmp=$ADTTMP
 if [ x"$tmp" = x ]; then
@@ -359,9 +360,11 @@ t-expect-fsck-fail () {
 }
 
 t-git-fsck () {
 }
 
 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 \
        set +e
        LC_MESSAGES=C git fsck --no-dangling --strict 2>&1 \
-               | tee dgit-test-fsck.errs
+               | tee $fsckerrs
        ps="${PIPESTATUS[*]}"
        set -e
 
        ps="${PIPESTATUS[*]}"
        set -e
 
@@ -375,7 +378,7 @@ t-git-fsck () {
        pats+=(-e 'notice: No default references')
 
        set +e
        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
        rc=$?
        set -e
        case $rc in
@@ -984,7 +987,6 @@ t-git-config () {
 }
 
 t-drs () {
 }
 
 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
  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