diff options
| author | Michael J Gruber <git@grubix.eu> | 2017-09-07 16:02:20 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2017-09-08 10:37:24 +0900 |
| commit | 4db464f815a38c7d9feee5db883f78216002ae3d (patch) | |
| tree | 4907d9d267fc5519b56815c915ef90756d611735 /t/test-lib.sh | |
| parent | 3ec7d702a89c647ddf42a59bc3539361367de9d5 (diff) | |
| download | git-4db464f815a38c7d9feee5db883f78216002ae3d.tar.xz | |
t7004: move limited stack prereq to test-lib
The lazy prerequisite ULIMIT_STACK_SIZE is used only in t7004 so far.
Move it to test-lib.sh so that it can be used in other tests (which it will
be in a follow-up commit).
Signed-off-by: Michael J Gruber <git@grubix.eu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/test-lib.sh')
| -rw-r--r-- | t/test-lib.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index 5fbd8d4a90..f22c1b260a 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -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" |
