Skip to content

Commit 4db464f

Browse files
mjggitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3ec7d70 commit 4db464f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

t/t7004-tag.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1863,12 +1863,6 @@ test_expect_success 'version sort with very long prerelease suffix' '
18631863
git tag -l --sort=version:refname
18641864
'
18651865

1866-
run_with_limited_stack () {
1867-
(ulimit -s 128 && "$@")
1868-
}
1869-
1870-
test_lazy_prereq ULIMIT_STACK_SIZE 'run_with_limited_stack true'
1871-
18721866
# we require ulimit, this excludes Windows
18731867
test_expect_success ULIMIT_STACK_SIZE '--contains and --no-contains work in a deep repo' '
18741868
>expect &&

t/test-lib.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,12 @@ run_with_limited_cmdline () {
11671167

11681168
test_lazy_prereq CMDLINE_LIMIT 'run_with_limited_cmdline true'
11691169

1170+
run_with_limited_stack () {
1171+
(ulimit -s 128 && "$@")
1172+
}
1173+
1174+
test_lazy_prereq ULIMIT_STACK_SIZE 'run_with_limited_stack true'
1175+
11701176
build_option () {
11711177
git version --build-options |
11721178
sed -ne "s/^$1: //p"

0 commit comments

Comments
 (0)