From: Junio C Hamano Date: Tue, 19 May 2015 20:17:54 +0000 (-0700) Subject: Merge branch 'jk/test-chain-lint' X-Git-Tag: v2.5.0-rc0~111 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/da3d507ce06b5e081c440a8f4ac85df351b4cd1d?ds=inline;hp=-c Merge branch 'jk/test-chain-lint' 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 --- da3d507ce06b5e081c440a8f4ac85df351b4cd1d diff --combined t/test-lib.sh index 4ea99a209d,281c1eca09..39da9c2d99 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@@ -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'