Merge branch 'jk/test-chain-lint'
authorJunio C Hamano <gitster@pobox.com>
Tue, 19 May 2015 20:17:54 +0000 (13:17 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 19 May 2015 20:17:54 +0000 (13:17 -0700)
Developer support to automatically detect broken &&-chain in the
test scripts is now turned on by default.

* jk/test-chain-lint:
test-lib: turn on GIT_TEST_CHAIN_LINT by default
t7502-commit.sh: fix a broken and-chain

1  2 
t/test-lib.sh
diff --combined t/test-lib.sh
index 4ea99a209d74d7d052a880a2a69d99a65a9dd0a6,281c1eca0925664a1bddec0e2edca017f68a1a47..39da9c2d9950848cf97686656d80f0f7ad5e3548
@@@ -152,7 -152,10 +152,7 @@@ unset UNZI
  
  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 ! *"
 +      GIT_TRACE=4
        ;;
  esac
  
@@@ -302,7 -305,6 +302,7 @@@ die () 
  
  GIT_EXIT_OK=
  trap 'die' EXIT
 +trap 'exit $?' INT
  
  # The user-facing functions are loaded from a separate file so that
  # test_perf subshells can have them too
@@@ -529,7 -531,7 +529,7 @@@ test_run_ () 
        test_cleanup=:
        expecting_failure=$2
  
-       if test "${GIT_TEST_CHAIN_LINT:-0}" != 0; then
+       if test "${GIT_TEST_CHAIN_LINT:-1}" != 0; then
                # 117 is magic because it is unlikely to match the exit
                # code of other programs
                test_eval_ "(exit 117) && $1"
@@@ -1078,9 -1080,3 +1078,9 @@@ test_lazy_prereq UNZIP 
        "$GIT_UNZIP" -v
        test $? -ne 127
  '
 +
 +run_with_limited_cmdline () {
 +      (ulimit -s 128 && "$@")
 +}
 +
 +test_lazy_prereq CMDLINE_LIMIT 'run_with_limited_cmdline true'