Skip to content

Commit 0d3911a

Browse files
pks-tgitster
authored andcommitted
ci: install test dependencies for linux-musl
The linux-musl CI job executes tests on Alpine Linux, which is based on musl libc instead of glibc. We're missing some test dependencies though, which causes us to skip a subset of tests. Install these test dependencies to increase our test coverage on this platform. There are still some missing test dependecies, but these do not have a corresponding package in the Alpine repositories: - p4 and p4d, both parts of the Perforce version control system. - cvsps, which generates patch sets for CVS. - Subversion and the SVN::Core Perl library, the latter of which is not available in the Alpine repositories. While the tool itself is available, all Subversion-related tests are skipped without the SVN::Core Perl library anyway. The Apache2-based tests require a bit more care though. For one, the module path is different on Alpine Linux, which requires us to add it to the list of known module paths to detect it. But second, the WebDAV module on Alpine Linux is broken because it does not bundle the default database backend [1]. We thus need to skip the WebDAV-based tests on Alpine Linux for now. [1]: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13112 Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent dd02c3b commit 0d3911a

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

ci/install-docker-dependencies.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ linux32)
1717
;;
1818
linux-musl)
1919
apk add --update build-base curl-dev openssl-dev expat-dev gettext \
20-
pcre2-dev python3 musl-libintl perl-utils ncurses >/dev/null
20+
pcre2-dev python3 musl-libintl perl-utils ncurses \
21+
apache2 apache2-http2 apache2-proxy apache2-ssl apache2-webdav apr-util-dbd_sqlite3 \
22+
bash cvs gnupg perl-cgi perl-dbd-sqlite >/dev/null
2123
;;
2224
pedantic)
2325
dnf -yq update >/dev/null &&

t/lib-httpd.sh

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ for DEFAULT_HTTPD_MODULE_PATH in '/usr/libexec/apache2' \
6767
'/usr/lib/apache2/modules' \
6868
'/usr/lib64/httpd/modules' \
6969
'/usr/lib/httpd/modules' \
70-
'/usr/libexec/httpd'
70+
'/usr/libexec/httpd' \
71+
'/usr/lib/apache2'
7172
do
7273
if test -d "$DEFAULT_HTTPD_MODULE_PATH"
7374
then
@@ -127,6 +128,20 @@ else
127128
"Could not identify web server at '$LIB_HTTPD_PATH'"
128129
fi
129130

131+
if test -n "$LIB_HTTPD_DAV" && test -f /etc/os-release
132+
then
133+
case "$(grep "^ID=" /etc/os-release | cut -d= -f2-)" in
134+
alpine)
135+
# The WebDAV module in Alpine Linux is broken at least up to
136+
# Alpine v3.16 as the default DBM driver is missing.
137+
#
138+
# https://gitlab.alpinelinux.org/alpine/aports/-/issues/13112
139+
test_skip_or_die GIT_TEST_HTTPD \
140+
"Apache WebDAV module does not have default DBM backend driver"
141+
;;
142+
esac
143+
fi
144+
130145
install_script () {
131146
write_script "$HTTPD_ROOT_PATH/$1" <"$TEST_PATH/$1"
132147
}

0 commit comments

Comments
 (0)