Merge branch 'jk/test-framework-updates'
authorJunio C Hamano <gitster@pobox.com>
Fri, 10 Jan 2014 18:33:34 +0000 (10:33 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Jan 2014 18:33:34 +0000 (10:33 -0800)
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

1  2 
t/test-lib.sh
diff --combined t/test-lib.sh
index 1cf78d5b113e0ddac8cdda9b8bc9b49db7b43451,f54a77c2928641b1f70d06e9ea0c7b984777d365..1531c241c08f0fad1a8e0789dbed2675b0fe5e56
@@@ -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 &&