t7004: move limited stack prereq to test-lib
[gitweb.git] / t / test-lib.sh
index 5fbd8d4a90b3b88cf57ca53c6b1fe99d5a957460..f22c1b260aa10e521930eb6f786f294a8aca3a74 100644 (file)
@@ -1167,6 +1167,12 @@ run_with_limited_cmdline () {
 
 test_lazy_prereq CMDLINE_LIMIT 'run_with_limited_cmdline true'
 
+run_with_limited_stack () {
+       (ulimit -s 128 && "$@")
+}
+
+test_lazy_prereq ULIMIT_STACK_SIZE 'run_with_limited_stack true'
+
 build_option () {
        git version --build-options |
        sed -ne "s/^$1: //p"