From: Junio C Hamano Date: Fri, 10 Jan 2014 18:33:34 +0000 (-0800) Subject: Merge branch 'jk/test-framework-updates' X-Git-Tag: v1.9-rc0~23 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/f0f493ec58489c739839e8d257a04159889639c6?ds=inline;hp=-c Merge branch 'jk/test-framework-updates' The basic test used to leave unnecessary trash directories in the t/ directory. * jk/test-framework-updates: t0000: drop "known breakage" test t0000: simplify HARNESS_ACTIVE hack t0000: set TEST_OUTPUT_DIRECTORY for sub-tests --- f0f493ec58489c739839e8d257a04159889639c6 diff --combined t/test-lib.sh index 1cf78d5b11,f54a77c292..1531c241c0 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@@ -1,4 -1,4 +1,4 @@@ -#!/bin/sh +# Test framework for git. See t/README for usage. # # Copyright (c) 2005 Junio C Hamano # @@@ -26,10 -26,6 +26,10 @@@ the # outside of t/, e.g. for running tests on the test library # itself. TEST_DIRECTORY=$(pwd) +else + # ensure that TEST_DIRECTORY is an absolute path so that it + # is valid even if the current working directory is changed + TEST_DIRECTORY=$(cd "$TEST_DIRECTORY" && pwd) || exit 1 fi if test -z "$TEST_OUTPUT_DIRECTORY" then @@@ -481,8 -477,6 +481,6 @@@ test_at_end_hook_ () test_done () { GIT_EXIT_OK=t - # Note: t0000 relies on $HARNESS_ACTIVE disabling the .counts - # output file if test -z "$HARNESS_ACTIVE" then test_results_dir="$TEST_OUTPUT_DIRECTORY/test-results" @@@ -577,9 -571,11 +575,9 @@@ the make_valgrind_symlink () { # handle only executables, unless they are shell libraries that - # need to be in the exec-path. We will just use "#!" as a - # guess for a shell-script, since we have no idea what the user - # may have configured as the shell path. + # need to be in the exec-path. test -x "$1" || - test "#!" = "$(head -c 2 <"$1")" || + test "# " = "$(head -c 2 <"$1")" || return; base=$(basename "$1") @@@ -832,10 -828,6 +830,10 @@@ test_lazy_prereq SYMLINKS ln -s x y && test -h y ' +test_lazy_prereq FILEMODE ' + test "$(git config --bool core.filemode)" = true +' + test_lazy_prereq CASE_INSENSITIVE_FS ' echo good >CamelCase && echo bad >camelcase &&