Browse Source

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>
maint
Michael J Gruber 8 years ago committed by Junio C Hamano
parent
commit
4db464f815
  1. 6
      t/t7004-tag.sh
  2. 6
      t/test-lib.sh

6
t/t7004-tag.sh

@ -1863,12 +1863,6 @@ test_expect_success 'version sort with very long prerelease suffix' ' @@ -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 &&

6
t/test-lib.sh

@ -1167,6 +1167,12 @@ run_with_limited_cmdline () { @@ -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"

Loading…
Cancel
Save