зеркало из https://github.com/microsoft/git.git
Merge branch 'jk/t5561-missing-curl'
Test fixes. * jk/t5561-missing-curl: t5561: skip tests if curl is not available t5561: drop curl stderr redirects
This commit is contained in:
Коммит
e6986abb77
|
@ -3,10 +3,16 @@
|
||||||
test_description='test git-http-backend'
|
test_description='test git-http-backend'
|
||||||
. ./test-lib.sh
|
. ./test-lib.sh
|
||||||
. "$TEST_DIRECTORY"/lib-httpd.sh
|
. "$TEST_DIRECTORY"/lib-httpd.sh
|
||||||
|
|
||||||
|
if ! test_have_prereq CURL; then
|
||||||
|
skip_all='skipping raw http-backend tests, curl not available'
|
||||||
|
test_done
|
||||||
|
fi
|
||||||
|
|
||||||
start_httpd
|
start_httpd
|
||||||
|
|
||||||
GET() {
|
GET() {
|
||||||
curl --include "$HTTPD_URL/$SMART/repo.git/$1" >out 2>/dev/null &&
|
curl --include "$HTTPD_URL/$SMART/repo.git/$1" >out &&
|
||||||
tr '\015' Q <out |
|
tr '\015' Q <out |
|
||||||
sed '
|
sed '
|
||||||
s/Q$//
|
s/Q$//
|
||||||
|
@ -19,7 +25,7 @@ GET() {
|
||||||
POST() {
|
POST() {
|
||||||
curl --include --data "$2" \
|
curl --include --data "$2" \
|
||||||
--header "Content-Type: application/x-$1-request" \
|
--header "Content-Type: application/x-$1-request" \
|
||||||
"$HTTPD_URL/smart/repo.git/$1" >out 2>/dev/null &&
|
"$HTTPD_URL/smart/repo.git/$1" >out &&
|
||||||
tr '\015' Q <out |
|
tr '\015' Q <out |
|
||||||
sed '
|
sed '
|
||||||
s/Q$//
|
s/Q$//
|
||||||
|
|
|
@ -1208,3 +1208,7 @@ test_lazy_prereq LONG_IS_64BIT '
|
||||||
|
|
||||||
test_lazy_prereq TIME_IS_64BIT 'test-tool date is64bit'
|
test_lazy_prereq TIME_IS_64BIT 'test-tool date is64bit'
|
||||||
test_lazy_prereq TIME_T_IS_64BIT 'test-tool date time_t-is64bit'
|
test_lazy_prereq TIME_T_IS_64BIT 'test-tool date time_t-is64bit'
|
||||||
|
|
||||||
|
test_lazy_prereq CURL '
|
||||||
|
curl --version
|
||||||
|
'
|
||||||
|
|
Загрузка…
Ссылка в новой задаче