Merge branch 'maint'
authorJunio C Hamano <gitster@pobox.com>
Fri, 12 Apr 2013 00:41:48 +0000 (17:41 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 12 Apr 2013 00:41:48 +0000 (17:41 -0700)
* maint:
Typo fix: replacing it's -> its
t: make PIPE a standard test prerequisite
archive: clarify explanation of --worktree-attributes
t/README: --immediate skips cleanup commands for failed tests

1  2 
t/README
t/test-lib.sh
diff --combined t/README
index 9b41fe7a9f55b3803aa52cd26c9f0af4e34830ee,f8bf3ec318f24b883efc75a4b157919687e34156..e669bb31b9aa2513a6f71de9fd066a21a0a3bde7
+++ b/t/README
@@@ -86,32 -86,26 +86,35 @@@ appropriately before running "make"
  
  --immediate::
        This causes the test to immediately exit upon the first
-       failed test.
+       failed test. Cleanup commands requested with
+       test_when_finished are not executed if the test failed,
+       in order to keep the state for inspection by the tester
+       to diagnose the bug.
  
  --long-tests::
        This causes additional long-running tests to be run (where
        available), for more exhaustive testing.
  
 ---valgrind::
 -      Execute all Git binaries with valgrind and exit with status
 -      126 on errors (just like regular tests, this will only stop
 -      the test script when running under -i).  Valgrind errors
 -      go to stderr, so you might want to pass the -v option, too.
 +--valgrind=<tool>::
 +      Execute all Git binaries under valgrind tool <tool> and exit
 +      with status 126 on errors (just like regular tests, this will
 +      only stop the test script when running under -i).
  
        Since it makes no sense to run the tests with --valgrind and
        not see any output, this option implies --verbose.  For
        convenience, it also implies --tee.
  
 -      Note that valgrind is run with the option --leak-check=no,
 +      <tool> defaults to 'memcheck', just like valgrind itself.
 +      Other particularly useful choices include 'helgrind' and
 +      'drd', but you may use any tool recognized by your valgrind
 +      installation.
 +
 +      As a special case, <tool> can be 'memcheck-fast', which uses
 +      memcheck but disables --track-origins.  Use this if you are
 +      running tests in bulk, to see if there are _any_ memory
 +      issues.
 +
 +      Note that memcheck is run with the option --leak-check=no,
        as the git process is short-lived and some errors are not
        interesting. In order to run a single command under the same
        conditions manually, you should set GIT_VALGRIND to point to
@@@ -619,6 -613,11 +622,11 @@@ use these, and "test_set_prereq" for ho
     The process retains the same pid across exec(2). See fb9a2bea for
     details.
  
+  - PIPE
+    The filesystem we're on supports creation of FIFOs (named pipes)
+    via mkfifo(1).
   - SYMLINKS
  
     The filesystem we're on supports symbolic links. E.g. a FAT
diff --combined t/test-lib.sh
index da57a2f45c3d76991f823364743fcdf73b524a91,8d76cf23d46c813991fbf59da2f1f3b79110547c..debd8b475186591ec1d1ef38848fef1a213889f4
        --no-color)
                color=; shift ;;
        --va|--val|--valg|--valgr|--valgri|--valgrin|--valgrind)
 -              valgrind=t; verbose=t; shift ;;
 +              valgrind=memcheck
 +              shift ;;
 +      --valgrind=*)
 +              valgrind=$(expr "z$1" : 'z[^=]*=\(.*\)')
 +              shift ;;
        --tee)
                shift ;; # was handled already
        --root=*)
        esac
  done
  
 +test -n "$valgrind" && verbose=t
 +
  if test -n "$color"
  then
        say_color () {
@@@ -536,8 -530,6 +536,8 @@@ the
        PATH=$GIT_VALGRIND/bin:$PATH
        GIT_EXEC_PATH=$GIT_VALGRIND/bin
        export GIT_VALGRIND
 +      GIT_VALGRIND_MODE="$valgrind"
 +      export GIT_VALGRIND_MODE
  elif test -n "$GIT_TEST_INSTALLED"
  then
        GIT_EXEC_PATH=$($GIT_TEST_INSTALLED/git --exec-path)  ||
@@@ -735,6 -727,11 +735,11 @@@ test_i18ngrep () 
        fi
  }
  
+ test_lazy_prereq PIPE '
+       # test whether the filesystem supports FIFOs
+       rm -f testfifo && mkfifo testfifo
+ '
  test_lazy_prereq SYMLINKS '
        # test whether the filesystem supports symbolic links
        ln -s x y && test -h y