To fix an occasional test failure, the next patch will rely on an Apache log format specifier that was introduced in version 2.2.30. Consequently, 't/lib-httpd.sh' must be able to decide whether the Apache version used for testing is equal or newer than that version to be able to act accordingly when processing the webserver's access log. $HTTPD_VERSION currently only contains Apache's major version, so change how Apache's version string is parsed to store the minor and patch versions as well. Furthermore, update the only condition looking at $HTTPD_VERSION to deal with the full version. Signed-off-by: SZEDER Gábor <szeder.dev@xxxxxxxxx> --- t/lib-httpd.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh index b6788fea57..5915625631 100644 --- a/t/lib-httpd.sh +++ b/t/lib-httpd.sh @@ -99,13 +99,13 @@ then fi HTTPD_VERSION=$($LIB_HTTPD_PATH -v | \ - sed -n 's/^Server version: Apache\/\([0-9]*\)\..*$/\1/p; q') + sed -n 's/^Server version: Apache\/\([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/p; q') if test -n "$HTTPD_VERSION" then if test -z "$LIB_HTTPD_MODULE_PATH" then - if ! test $HTTPD_VERSION -ge 2 + if ! test ${HTTPD_VERSION%%.*} -ge 2 then test_skip_or_die $GIT_TEST_HTTPD \ "at least Apache version 2 is required" -- 2.18.0.rc0.207.ga6211da864