]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t7004: move limited stack prereq to test-lib
authorMichael J Gruber <git@grubix.eu>
Thu, 7 Sep 2017 14:02:20 +0000 (16:02 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 8 Sep 2017 01:37:24 +0000 (10:37 +0900)
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>
t/t7004-tag.sh
t/test-lib.sh

index dbcd6f623c7e233b487d4d0c1dd7d71cb34059b0..5bf5ace56bfde11e9b080db09e45db8df26a539f 100755 (executable)
@@ -1863,12 +1863,6 @@ test_expect_success 'version sort with very long prerelease suffix' '
        git tag -l --sort=version:refname
 '
 
-run_with_limited_stack () {
-       (ulimit -s 128 && "$@")
-}
-
-test_lazy_prereq ULIMIT_STACK_SIZE 'run_with_limited_stack true'
-
 # we require ulimit, this excludes Windows
 test_expect_success ULIMIT_STACK_SIZE '--contains and --no-contains work in a deep repo' '
        >expect &&
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"