You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2020/06/17 11:18:59 UTC

svn commit: r1878917 - in /httpd/httpd/branches/2.4.x: ./ .travis.yml test/README.travis test/travis_Dockerfile_slapd test/travis_before_linux.sh test/travis_run_linux.sh

Author: jorton
Date: Wed Jun 17 11:18:59 2020
New Revision: 1878917

URL: http://svn.apache.org/viewvc?rev=1878917&view=rev
Log:
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.


Added:
    httpd/httpd/branches/2.4.x/test/travis_Dockerfile_slapd
      - copied, changed from r1878663, httpd/httpd/trunk/test/travis_Dockerfile_slapd
Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/.travis.yml
    httpd/httpd/branches/2.4.x/test/README.travis
    httpd/httpd/branches/2.4.x/test/travis_before_linux.sh
    httpd/httpd/branches/2.4.x/test/travis_run_linux.sh

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1877250,1878502,1878654,1878660,1878663,1878889

Modified: httpd/httpd/branches/2.4.x/.travis.yml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/.travis.yml?rev=1878917&r1=1878916&r2=1878917&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/.travis.yml (original)
+++ httpd/httpd/branches/2.4.x/.travis.yml Wed Jun 17 11:18:59 2020
@@ -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

Modified: httpd/httpd/branches/2.4.x/test/README.travis
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/test/README.travis?rev=1878917&r1=1878916&r2=1878917&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/test/README.travis (original)
+++ httpd/httpd/branches/2.4.x/test/README.travis Wed Jun 17 11:18:59 2020
@@ -32,6 +32,12 @@ The Travis scripts use the following env
 
 * 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
 -------
 

Copied: httpd/httpd/branches/2.4.x/test/travis_Dockerfile_slapd (from r1878663, httpd/httpd/trunk/test/travis_Dockerfile_slapd)
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/test/travis_Dockerfile_slapd?p2=httpd/httpd/branches/2.4.x/test/travis_Dockerfile_slapd&p1=httpd/httpd/trunk/test/travis_Dockerfile_slapd&r1=1878663&r2=1878917&rev=1878917&view=diff
==============================================================================
--- httpd/httpd/trunk/test/travis_Dockerfile_slapd (original)
+++ httpd/httpd/branches/2.4.x/test/travis_Dockerfile_slapd Wed Jun 17 11:18:59 2020
@@ -4,6 +4,6 @@ RUN echo slapd slapd/password2 password
 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
+RUN apt-get update && apt-get -y install slapd ldap-utils
 # With -d passed, slapd stays in the foreground
-CMD /usr/sbin/slapd -d1
+CMD /usr/sbin/slapd -d1 '-h ldap:// ldapi:///'

Modified: httpd/httpd/branches/2.4.x/test/travis_before_linux.sh
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/test/travis_before_linux.sh?rev=1878917&r1=1878916&r2=1878917&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/test/travis_before_linux.sh (original)
+++ httpd/httpd/branches/2.4.x/test/travis_before_linux.sh Wed Jun 17 11:18:59 2020
@@ -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}"

Modified: httpd/httpd/branches/2.4.x/test/travis_run_linux.sh
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/test/travis_run_linux.sh?rev=1878917&r1=1878916&r2=1878917&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/test/travis_run_linux.sh (original)
+++ httpd/httpd/branches/2.4.x/test/travis_run_linux.sh Wed Jun 17 11:18:59 2020
@@ -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