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/09 14:50:54 UTC

svn commit: r1878663 - in /httpd/httpd/trunk: .travis.yml test/README.travis test/travis_Dockerfile_slapd test/travis_before_linux.sh test/travis_run_linux.sh

Author: jorton
Date: Tue Jun  9 14:50:53 2020
New Revision: 1878663

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

Added:
    httpd/httpd/trunk/test/travis_Dockerfile_slapd
Modified:
    httpd/httpd/trunk/.travis.yml
    httpd/httpd/trunk/test/README.travis
    httpd/httpd/trunk/test/travis_before_linux.sh
    httpd/httpd/trunk/test/travis_run_linux.sh

Modified: httpd/httpd/trunk/.travis.yml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/.travis.yml?rev=1878663&r1=1878662&r2=1878663&view=diff
==============================================================================
--- httpd/httpd/trunk/.travis.yml (original)
+++ httpd/httpd/trunk/.travis.yml Tue Jun  9 14:50:53 2020
@@ -27,6 +27,7 @@ addons:
       - libjansson-dev
       - libpcre2-dev
       - libldap2-dev
+      - ldap-utils
 env:
   global:
     - MFLAGS=-j2
@@ -217,9 +218,16 @@ jobs:
            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

Modified: httpd/httpd/trunk/test/README.travis
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/test/README.travis?rev=1878663&r1=1878662&r2=1878663&view=diff
==============================================================================
--- httpd/httpd/trunk/test/README.travis (original)
+++ httpd/httpd/trunk/test/README.travis Tue Jun  9 14:50:53 2020
@@ -34,6 +34,12 @@ The Travis scripts use the following env
 
 * TEST_INSTALL - set for builds testing "make install"
 
+* 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
 -------
 

Added: httpd/httpd/trunk/test/travis_Dockerfile_slapd
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/test/travis_Dockerfile_slapd?rev=1878663&view=auto
==============================================================================
--- httpd/httpd/trunk/test/travis_Dockerfile_slapd (added)
+++ httpd/httpd/trunk/test/travis_Dockerfile_slapd Tue Jun  9 14:50:53 2020
@@ -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
+# With -d passed, slapd stays in the foreground
+CMD /usr/sbin/slapd -d1

Modified: httpd/httpd/trunk/test/travis_before_linux.sh
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/test/travis_before_linux.sh?rev=1878663&r1=1878662&r2=1878663&view=diff
==============================================================================
--- httpd/httpd/trunk/test/travis_before_linux.sh (original)
+++ httpd/httpd/trunk/test/travis_before_linux.sh Tue Jun  9 14:50:53 2020
@@ -81,6 +81,16 @@ 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:
+LDIF=test/perl-framework/scripts/httpd.ldif
+if test -v TEST_LDAP -a -r $LDIF ; then
+    docker build -t httpd_slapd -f test/travis_Dockerfile_slapd test/
+    docker run -d -p 8389:389 httpd_slapd | tee .slapd.cid
+    sleep 5
+    ldapadd -H ldap://localhost:8389 -D cn=admin,dc=example,dc=com -w travis < $LDIF
+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/trunk/test/travis_run_linux.sh
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/test/travis_run_linux.sh?rev=1878663&r1=1878662&r2=1878663&view=diff
==============================================================================
--- httpd/httpd/trunk/test/travis_run_linux.sh (original)
+++ httpd/httpd/trunk/test/travis_run_linux.sh Tue Jun  9 14:50:53 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