Skip to content

Commit

Permalink
t5541: move run_with_cmdline_limit to test-lib.sh
Browse files Browse the repository at this point in the history
We use this to test http pushing with a restricted
commandline. Other scripts (like t5551, which does http
fetching) will want to use it, too.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Mar 13, 2015
1 parent 89c57ab commit 9a308de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 0 additions & 6 deletions t/t5541-http-push-smart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,6 @@ test_expect_success 'push into half-auth-complete requires password' '
test_cmp expect actual
'

run_with_limited_cmdline () {
(ulimit -s 128 && "$@")
}

test_lazy_prereq CMDLINE_LIMIT 'run_with_limited_cmdline true'

test_expect_success CMDLINE_LIMIT 'push 2000 tags over http' '
sha1=$(git rev-parse HEAD) &&
test_seq 2000 |
Expand Down
6 changes: 6 additions & 0 deletions t/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1062,3 +1062,9 @@ test_lazy_prereq UNZIP '
"$GIT_UNZIP" -v
test $? -ne 127
'

run_with_limited_cmdline () {
(ulimit -s 128 && "$@")
}

test_lazy_prereq CMDLINE_LIMIT 'run_with_limited_cmdline true'

0 comments on commit 9a308de

Please sign in to comment.