summaryrefslogtreecommitdiff
path: root/t/test-lib.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-04-21 12:12:24 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-04-21 12:12:24 -0700
commitd3115a35fc29e7a55131a677878e67725d4cc165 (patch)
treeb6c0ecad93b631d2be36f4677aede75221a60322 /t/test-lib.sh
parentMerge branch 'pt/enter-repo-comment-fix' into maint (diff)
parentt5551: make EXPENSIVE test cheaper (diff)
downloadtgif-d3115a35fc29e7a55131a677878e67725d4cc165.tar.xz
Merge branch 'jk/test-annoyances' into maint
Test fixes. * jk/test-annoyances: t5551: make EXPENSIVE test cheaper t5541: move run_with_cmdline_limit to test-lib.sh t: pass GIT_TRACE through Apache t: redirect stderr GIT_TRACE to descriptor 4 t: translate SIGINT to an exit
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index c09677802c..9914d3e1cf 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -152,10 +152,7 @@ unset UNZIP
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
@@ -299,6 +296,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
@@ -1064,3 +1062,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'