t5541: move run_with_cmdline_limit to test-lib.sh
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>
This commit is contained in:
parent
89c57ab3f0
commit
9a308de37c
@ -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 |
|
||||
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user