Merge branch 'jk/test-annoyances'
Test fixes. * jk/test-annoyances: t5551: make EXPENSIVE test cheaper t5541: move run_with_cmdline_limit to test-lib.sh t: pass GIT_TRACE through Apache t: redirect stderr GIT_TRACE to descriptor 4 t: translate SIGINT to an exit
This commit is contained in:
commit
07da4e092f
@ -79,6 +79,7 @@ HTTPD_DOCUMENT_ROOT_PATH=$HTTPD_ROOT_PATH/www
|
|||||||
# hack to suppress apache PassEnv warnings
|
# hack to suppress apache PassEnv warnings
|
||||||
GIT_VALGRIND=$GIT_VALGRIND; export GIT_VALGRIND
|
GIT_VALGRIND=$GIT_VALGRIND; export GIT_VALGRIND
|
||||||
GIT_VALGRIND_OPTIONS=$GIT_VALGRIND_OPTIONS; export GIT_VALGRIND_OPTIONS
|
GIT_VALGRIND_OPTIONS=$GIT_VALGRIND_OPTIONS; export GIT_VALGRIND_OPTIONS
|
||||||
|
GIT_TRACE=$GIT_TRACE; export GIT_TRACE
|
||||||
|
|
||||||
if ! test -x "$LIB_HTTPD_PATH"
|
if ! test -x "$LIB_HTTPD_PATH"
|
||||||
then
|
then
|
||||||
|
@ -70,6 +70,7 @@ PassEnv GIT_VALGRIND
|
|||||||
PassEnv GIT_VALGRIND_OPTIONS
|
PassEnv GIT_VALGRIND_OPTIONS
|
||||||
PassEnv GNUPGHOME
|
PassEnv GNUPGHOME
|
||||||
PassEnv ASAN_OPTIONS
|
PassEnv ASAN_OPTIONS
|
||||||
|
PassEnv GIT_TRACE
|
||||||
|
|
||||||
Alias /dumb/ www/
|
Alias /dumb/ www/
|
||||||
Alias /auth/dumb/ www/auth/dumb/
|
Alias /auth/dumb/ www/auth/dumb/
|
||||||
|
@ -324,12 +324,6 @@ test_expect_success 'push into half-auth-complete requires password' '
|
|||||||
test_cmp expect actual
|
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' '
|
test_expect_success CMDLINE_LIMIT 'push 2000 tags over http' '
|
||||||
sha1=$(git rev-parse HEAD) &&
|
sha1=$(git rev-parse HEAD) &&
|
||||||
test_seq 2000 |
|
test_seq 2000 |
|
||||||
|
@ -224,10 +224,10 @@ test_expect_success 'transfer.hiderefs works over smart-http' '
|
|||||||
git -C hidden.git rev-parse --verify b
|
git -C hidden.git rev-parse --verify b
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success EXPENSIVE 'create 50,000 tags in the repo' '
|
test_expect_success 'create 2,000 tags in the repo' '
|
||||||
(
|
(
|
||||||
cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
|
cd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
|
||||||
for i in `test_seq 50000`
|
for i in $(test_seq 2000)
|
||||||
do
|
do
|
||||||
echo "commit refs/heads/too-many-refs"
|
echo "commit refs/heads/too-many-refs"
|
||||||
echo "mark :$i"
|
echo "mark :$i"
|
||||||
@ -248,13 +248,22 @@ test_expect_success EXPENSIVE 'create 50,000 tags in the repo' '
|
|||||||
)
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success EXPENSIVE 'clone the 50,000 tag repo to check OS command line overflow' '
|
test_expect_success CMDLINE_LIMIT \
|
||||||
git clone $HTTPD_URL/smart/repo.git too-many-refs &&
|
'clone the 2,000 tag repo to check OS command line overflow' '
|
||||||
|
run_with_limited_cmdline git clone $HTTPD_URL/smart/repo.git too-many-refs &&
|
||||||
(
|
(
|
||||||
cd too-many-refs &&
|
cd too-many-refs &&
|
||||||
test $(git for-each-ref refs/tags | wc -l) = 50000
|
git for-each-ref refs/tags >actual &&
|
||||||
|
test_line_count = 2000 actual
|
||||||
)
|
)
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success 'large fetch-pack requests can be split across POSTs' '
|
||||||
|
GIT_CURL_VERBOSE=1 git -c http.postbuffer=65536 \
|
||||||
|
clone --bare "$HTTPD_URL/smart/repo.git" split.git 2>err &&
|
||||||
|
grep "^> POST" err >posts &&
|
||||||
|
test_line_count = 2 posts
|
||||||
|
'
|
||||||
|
|
||||||
stop_httpd
|
stop_httpd
|
||||||
test_done
|
test_done
|
||||||
|
@ -152,10 +152,7 @@ unset UNZIP
|
|||||||
|
|
||||||
case $(echo $GIT_TRACE |tr "[A-Z]" "[a-z]") in
|
case $(echo $GIT_TRACE |tr "[A-Z]" "[a-z]") in
|
||||||
1|2|true)
|
1|2|true)
|
||||||
echo "* warning: Some tests will not work if GIT_TRACE" \
|
GIT_TRACE=4
|
||||||
"is set as to trace on STDERR ! *"
|
|
||||||
echo "* warning: Please set GIT_TRACE to something" \
|
|
||||||
"other than 1, 2 or true ! *"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@ -299,6 +296,7 @@ die () {
|
|||||||
|
|
||||||
GIT_EXIT_OK=
|
GIT_EXIT_OK=
|
||||||
trap 'die' EXIT
|
trap 'die' EXIT
|
||||||
|
trap 'exit $?' INT
|
||||||
|
|
||||||
# The user-facing functions are loaded from a separate file so that
|
# The user-facing functions are loaded from a separate file so that
|
||||||
# test_perf subshells can have them too
|
# test_perf subshells can have them too
|
||||||
@ -1064,3 +1062,9 @@ test_lazy_prereq UNZIP '
|
|||||||
"$GIT_UNZIP" -v
|
"$GIT_UNZIP" -v
|
||||||
test $? -ne 127
|
test $? -ne 127
|
||||||
'
|
'
|
||||||
|
|
||||||
|
run_with_limited_cmdline () {
|
||||||
|
(ulimit -s 128 && "$@")
|
||||||
|
}
|
||||||
|
|
||||||
|
test_lazy_prereq CMDLINE_LIMIT 'run_with_limited_cmdline true'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user