From: Joe Orton Date: Wed, 17 Jun 2020 11:18:59 +0000 (+0000) Subject: Merge r1877250, r1878502, r1878654, r1878660, r1878663, r1878889 from trunk: X-Git-Tag: 2.4.44~87 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0d7c9128366643f883b2a1110b367fb2dc492d29;p=thirdparty%2Fapache%2Fhttpd.git Merge r1877250, r1878502, r1878654, r1878660, r1878663, r1878889 from trunk: [under CTR for Travis integration] Add gcc-10 job, drop gcc-9 config from allow_failures (seems stable again). Use -O2 for all gcc -Werror jobs otherwise warnings triggered under e.g. aggressive inlining are not found. Build with LDAP support for APR 1.x. Dump end of error_log for test run failures. Tail more error_log for failed test suite runs in Travis. Disable all Travis notifications for forks (hopefully). Add Travis job which runs slapd in a container to allow testing mod_authnz_ldap, per new test case added in r1878655. * test/travis_Dockerfile_slapd: New dockerfile for running slapd. Update Travis LDAP testing to use new container setup script provided by test framework. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1878917 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/.travis.yml b/.travis.yml index 12b679e5b77..156db958a72 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,8 @@ addons: - libnghttp2-dev - libjansson-dev - libpcre2-dev + - libldap2-dev + - ldap-utils env: global: - MFLAGS=-j2 @@ -60,7 +62,7 @@ jobs: NOTEST_CFLAGS="-Werror" CC="gcc -m32" APR_VERSION=1.7.0 - APU_VERSION=1.6.1 APU_CONFIG="--with-crypto" + APU_VERSION=1.6.1 APU_CONFIG="--with-crypto --with-ldap" addons: apt: sources: @@ -74,6 +76,7 @@ jobs: - lib32z1-dev - libbrotli-dev:i386 - libpcre2-dev:i386 + - libldap2-dev:i386 - libtool-bin - perl-doc - libapr1-dev @@ -101,7 +104,7 @@ jobs: # ------------------------------------------------------------------------- - name: Linux Ubuntu, GCC 7 maintainer-mode w/-Werror os: linux - env: CONFIG="--enable-mods-shared=reallyall --enable-maintainer-mode NOTEST_CFLAGS=-Werror CC=gcc-7" + env: CONFIG="--enable-mods-shared=reallyall --enable-maintainer-mode" NOTEST_CFLAGS='-Werror -O2' CC=gcc-7 SKIP_TESTING=1 # ------------------------------------------------------------------------- - if: *condition_not_24x @@ -110,7 +113,7 @@ jobs: env: CONFIG="--enable-mods-shared=reallyall --with-pcre=/usr/bin/pcre-config --enable-maintainer-mode NOTEST_CFLAGS=-Werror CC=gcc-7" # ------------------------------------------------------------------------- - name: Linux Ubuntu, GCC 8 maintainer-mode w/-Werror - env: CONFIG="--enable-mods-shared=reallyall --enable-maintainer-mode NOTEST_CFLAGS=-Werror CC=gcc-8" + env: CONFIG="--enable-mods-shared=reallyall --enable-maintainer-mode" NOTEST_CFLAGS='-Werror -O2' CC=gcc-8 SKIP_TESTING=1 addons: apt: @@ -127,9 +130,10 @@ jobs: - libnghttp2-dev - libjansson-dev - libpcre2-dev + - libldap2-dev # ------------------------------------------------------------------------- - name: Linux Ubuntu, GCC 9 maintainer-mode w/-Werror - env: CONFIG="--enable-mods-shared=reallyall --enable-maintainer-mode NOTEST_CFLAGS=-Werror CC=gcc-9" + env: CONFIG="--enable-mods-shared=reallyall --enable-maintainer-mode" NOTEST_CFLAGS='-Werror -O2' CC=gcc-9 SKIP_TESTING=1 addons: apt: @@ -148,6 +152,29 @@ jobs: - libnghttp2-dev - libjansson-dev - libpcre2-dev + - libldap2-dev + # ------------------------------------------------------------------------- + - name: Linux Ubuntu, GCC 10 maintainer-mode w/-Werror + env: CONFIG="--enable-mods-shared=reallyall --enable-maintainer-mode" NOTEST_CFLAGS='-Werror -O2' CC=gcc-10 + SKIP_TESTING=1 + addons: + apt: + sources: + - sourceline: 'ppa:ubuntu-toolchain-r/test' + packages: + - gcc-10 + - libtool-bin + - libapr1-dev + - libaprutil1-dev + - perl-doc + - lua5.3-dev + - libbrotli-dev + - libcurl4-openssl-dev + - libsystemd-dev + - libnghttp2-dev + - libjansson-dev + - libpcre2-dev + - libldap2-dev # ------------------------------------------------------------------------- # MFLAGS= works around https://bz.apache.org/bugzilla/show_bug.cgi?id=63942 - if: *condition_not_24x @@ -172,28 +199,35 @@ jobs: dist: xenial env: APR_VERSION=1.7.0 APU_VERSION=1.6.1 CONFIG="--enable-mods-shared=reallyall" - APU_CONFIG="--with-crypto" + APU_CONFIG="--with-crypto --with-ldap" # ------------------------------------------------------------------------- - name: Linux Ubuntu, APR 1.7.0, APR-util 1.6.1 env: APR_VERSION=1.7.0 APU_VERSION=1.6.1 CONFIG="--enable-mods-shared=reallyall" - APU_CONFIG="--with-crypto" + APU_CONFIG="--with-crypto --with-ldap" # ------------------------------------------------------------------------- - name: Linux Ubuntu, APR 1.7.x, APR-util 1.7.x env: APR_VERSION=1.7.x APU_VERSION=1.7.x CONFIG="--enable-mods-shared=reallyall" - APU_CONFIG="--with-crypto" + APU_CONFIG="--with-crypto --with-ldap" CLEAR_CACHE=1 # ------------------------------------------------------------------------- - name: Linux Ubuntu, APR 1.7.0 --enable-pool-debug, APR-util 1.6.1 env: APR_VERSION=1.7.0 APR_CONFIG="--enable-pool-debug" - APU_VERSION=1.6.1 APU_CONFIG="--with-crypto" + APU_VERSION=1.6.1 APU_CONFIG="--with-crypto --with-ldap" CONFIG="--enable-mods-shared=reallyall" TEST_MALLOC=1 # ------------------------------------------------------------------------- + - name: Linux Ubuntu, APR 1.7.0, APR-util 1.6.1, pool-debug, LDAP + env: APR_VERSION=1.7.0 APR_CONFIG="--enable-pool-debug" + APU_VERSION=1.6.1 APU_CONFIG="--with-crypto --with-ldap" + CONFIG="--enable-mods-shared=reallyall" + TEST_MALLOC=1 TEST_LDAP=1 TEST_ARGS="-defines LDAP" + TESTS="t/modules/" + # ------------------------------------------------------------------------- - name: Linux Ubuntu, litmus WebDAV tests env: CONFIG="--enable-dav --enable-dav-fs" - LITMUS=1 TEST_ARGS="t/modules/dav.t" + LITMUS=1 TESTS="t/modules/dav.t" addons: apt: update: false @@ -236,9 +270,6 @@ jobs: env: CONFIG="--enable-mods-shared=reallyall" - arch: ppc64le env: CONFIG="--enable-mods-shared=reallyall" - # gcc 9 repo currently broken - - env: CONFIG="--enable-mods-shared=reallyall --enable-maintainer-mode NOTEST_CFLAGS=-Werror CC=gcc-9" - SKIP_TESTING=1 # CPAN modules are to be used with the system Perl and always with # CC=gcc, e.g. for the CC="gcc -m32" case the builds are not correct @@ -255,9 +286,15 @@ before_script: script: - ./test/travis_run_${TRAVIS_OS_NAME}.sh +# Send notifications by default to IRC and dev@, for everything but +# forks, otherwise any build from a fork will spam the list with CI +# results. notifications: - irc: "chat.freenode.net#httpd-dev" - # Disabled to avoid too many failure emails to dev@, - # some builds occasionally fail. + irc: + if: fork = false + channels: + - "chat.freenode.net#httpd-dev" email: - - dev@httpd.apache.org + if: fork = false + recipients: + - dev@httpd.apache.org diff --git a/test/README.travis b/test/README.travis index 1af91a2afc6..142e9d94742 100644 --- a/test/README.travis +++ b/test/README.travis @@ -32,6 +32,12 @@ The Travis scripts use the following environment variables: * TEST_MALLOC - set for builds using enhanced malloc debugging. +* TEST_LDAP - set for builds with slapd running + +* TESTS - a list of Perl framework tests to run + +* TEST_ARGS - arguments to pass to ./t/TEST in the Perl test framework + Caching ------- diff --git a/test/travis_Dockerfile_slapd b/test/travis_Dockerfile_slapd new file mode 100644 index 00000000000..e0729e3c2b6 --- /dev/null +++ b/test/travis_Dockerfile_slapd @@ -0,0 +1,9 @@ +FROM ubuntu:bionic +RUN echo slapd slapd/password1 password travis | debconf-set-selections +RUN echo slapd slapd/password2 password travis | debconf-set-selections +RUN echo slapd slapd/internal/adminpw password travis | debconf-set-selections +RUN echo slapd slapd/internal/generated_adminpw password travis | debconf-set-selections +RUN echo slapd slapd/domain string example.com | debconf-set-selections +RUN apt-get update && apt-get -y install slapd ldap-utils +# With -d passed, slapd stays in the foreground +CMD /usr/sbin/slapd -d1 '-h ldap:// ldapi:///' diff --git a/test/travis_before_linux.sh b/test/travis_before_linux.sh index 41c500f32d4..e46ea658379 100755 --- a/test/travis_before_linux.sh +++ b/test/travis_before_linux.sh @@ -81,6 +81,15 @@ if ! test -v SKIP_TESTING; then git clone --depth=1 https://github.com/apache/httpd-tests.git test/perl-framework fi +# For LDAP testing, run slapd listening on port 8389 and populate the +# directory as described in t/modules/ldap.t in the test framework: +if test -v TEST_LDAP -a -x test/perl-framework/scripts/ldap-init.sh; then + docker build -t httpd_ldap -f test/travis_Dockerfile_slapd test/ + pushd test/perl-framework + ./scripts/ldap-init.sh + popd +fi + if test -v APR_VERSION; then install_apx apr ${APR_VERSION} "${APR_CONFIG}" APU_CONFIG="$APU_CONFIG --with-apr=$HOME/root/apr-${APR_VERSION}" diff --git a/test/travis_run_linux.sh b/test/travis_run_linux.sh index f8fd6c5c4ec..818e39a504c 100755 --- a/test/travis_run_linux.sh +++ b/test/travis_run_linux.sh @@ -52,13 +52,13 @@ if ! test -v SKIP_TESTING; then fi if test -v WITH_TEST_SUITE; then - make check TESTS="${TEST_ARGS}" + make check TESTS="${TESTS}" TEST_CONFIG="${TEST_ARGS}" RV=$? else test -v TEST_INSTALL || make install pushd test/perl-framework perl Makefile.PL -apxs $PREFIX/bin/apxs - make test APACHE_TEST_EXTRA_ARGS="${TEST_ARGS}" + make test APACHE_TEST_EXTRA_ARGS="${TEST_ARGS} ${TESTS}" RV=$? popd fi @@ -66,6 +66,8 @@ if ! test -v SKIP_TESTING; then pushd test/perl-framework mkdir -p t/htdocs/modules/dav ./t/TEST -start + # litmus uses $TESTS, so unset it. + unset TESTS litmus http://localhost:8529/modules/dav/ RV=$? ./t/TEST -stop @@ -90,5 +92,9 @@ if ! test -v SKIP_TESTING; then RV=4 fi + if test $RV -ne 0 -a -r test/perl-framework/t/logs/error_log; then + tail -n200 test/perl-framework/t/logs/error_log + fi + exit $RV fi