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>
Michael J Gruber committed
Sep 7, 2017 at 16:02 UTC
4db464f815a38c7d9feee5db883f78216002ae3d
2 files changed
+6
-6
t/t7004-tag.sh
-6
@@ -1863,12 +1863,6 @@ test_expect_success 'version sort with very long prerelease suffix' '
1863
git tag -l --sort=version:refname
1864
'
1865
1866
-run_with_limited_stack () {
1867
- (ulimit -s 128 && "$@")
1868
-}
1869
-
1870
-test_lazy_prereq ULIMIT_STACK_SIZE 'run_with_limited_stack true'
1871
-
1866
# we require ulimit, this excludes Windows
1867
test_expect_success ULIMIT_STACK_SIZE '--contains and --no-contains work in a deep repo' '
1868
>expect &&
t/test-lib.sh
+6
@@ -1167,6 +1167,12 @@ run_with_limited_cmdline () {
1167
1168
test_lazy_prereq CMDLINE_LIMIT 'run_with_limited_cmdline true'
1169
1170
+run_with_limited_stack () {
1171
+ (ulimit -s 128 && "$@")
1172
+}
1173
+
1174
+test_lazy_prereq ULIMIT_STACK_SIZE 'run_with_limited_stack true'
1175
+
1176
build_option () {
1177
git version --build-options |
1178
sed -ne "s/^$1: //p"