clone: the given repository dir should be relative to $PWD
[gitweb.git] / t / test-lib.sh
index fba0c51d97ac0d3851589de3308bda1de0a1869d..2488e6eae1f515baa3adcaceca75000d15976612 100755 (executable)
@@ -9,6 +9,8 @@ LC_ALL=C
 PAGER=cat
 TZ=UTC
 export LANG LC_ALL PAGER TZ
+EDITOR=:
+VISUAL=:
 unset AUTHOR_DATE
 unset AUTHOR_EMAIL
 unset AUTHOR_NAME
@@ -30,6 +32,16 @@ unset SHA1_FILE_DIRECTORIES
 unset SHA1_FILE_DIRECTORY
 export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME
 export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME
+export EDITOR VISUAL
+
+case $(echo $GIT_TRACE |tr "[A-Z]" "[a-z]") in
+       1|2|true)
+               echo "* warning: Some tests will not work if GIT_TRACE" \
+                       "is set as to trace on STDERR ! *"
+               echo "* warning: Please set GIT_TRACE to something" \
+                       "other than 1, 2 or true ! *"
+               ;;
+esac
 
 # Each test should start with something like this, after copyright notices:
 #
@@ -123,6 +135,7 @@ test_expect_failure () {
        else
                test_failure_ "$@"
        fi
+       echo >&3 ""
 }
 
 test_expect_success () {
@@ -136,6 +149,7 @@ test_expect_success () {
        else
                test_failure_ "$@"
        fi
+       echo >&3 ""
 }
 
 test_expect_code () {
@@ -149,6 +163,7 @@ test_expect_code () {
        else
                test_failure_ "$@"
        fi
+       echo >&3 ""
 }
 
 # Most tests can use the created repository, but some amy need to create more.
@@ -199,15 +214,15 @@ export PATH GIT_EXEC_PATH
 PYTHON=`sed -e '1{
        s/^#!//
        q
-}' ../git-merge-recursive` || {
+}' ../git-merge-recursive-old` || {
        error "You haven't built things yet, have you?"
 }
 "$PYTHON" -c 'import subprocess' 2>/dev/null || {
        PYTHONPATH=$(pwd)/../compat
        export PYTHONPATH
 }
-PERL5LIB=$(pwd)/../perl/blib/lib:$(pwd)/../perl/blib/arch/auto/Git
-export PERL5LIB
+GITPERLLIB=$(pwd)/../perl/blib/lib:$(pwd)/../perl/blib/arch/auto/Git
+export GITPERLLIB
 test -d ../templates/blt || {
        error "You haven't built things yet, have you?"
 }