Changeset 52c3f68 in mod_gnutls


Ignore:
Timestamp:
May 16, 2015, 6:26:44 AM (4 years ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, upstream
Children:
7813802
Parents:
03295a9
Message:

Detect apache(2?)ctl and use it instead of starting Apache directly

This should help with portability across distributions that install the
Apache binary under different paths.

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    r03295a9 r52c3f68  
    9393                               test "$PDFLATEX" != "no"])
    9494
     95# Check for apache2ctl or apachectl
     96AC_PATH_PROGS([APACHECTL], [apache2ctl apachectl], [no])
     97if test "${APACHECTL}" = "no"; then
     98        AC_MSG_WARN([Neither apache2ctl nor apachectl found in \
     99                     PATH. Test suite will fail.])
     100fi
     101
    95102MODULE_CFLAGS="${LIBGNUTLS_CFLAGS} ${SRP_CFLAGS} ${MSVA_CFLAGS} ${APR_MEMCACHE_CFLAGS} ${APXS_CFLAGS} ${AP_INCLUDES} ${APR_INCLUDES} ${APU_INCLUDES} ${STRICT_CFLAGS}"
    96103MODULE_LIBS="${APR_MEMCACHE_LIBS} ${LIBGNUTLS_LIBS}"
  • test/Makefile.am

    r03295a9 r52c3f68  
    6666        runtests server-crl.template server-softhsm.conf softhsm.bash \
    6767        TestMakefile
     68
     69AM_TESTS_ENVIRONMENT = export APACHECTL=$(APACHECTL);
  • test/TestMakefile

    r03295a9 r52c3f68  
    77
    88export srcdir ?= .
     9# try default PATH for apachectl if missing (should only happen when
     10# the test script is run manually)
     11export APACHECTL ?= apachectl
    912
    1013export TEST_HOST ?= localhost
  • test/proxy_backend.bash

    r03295a9 r52c3f68  
    1414: ${BACKEND_LOCK:="backend.lock"}
    1515: ${srcdir:="."}
     16: ${APACHECTL:="apachectl"}
    1617
    1718function backend_apache
     
    3536            start)
    3637                ${flock_cmd} \
    37                     /usr/sbin/apache2 -f "$(realpath ${testdir}/${conf})" -k start || return 1
     38                    ${APACHECTL} -f "$(realpath ${testdir}/${conf})" -k start || return 1
    3839                ;;
    3940            stop)
    40                 /usr/sbin/apache2 -f "$(realpath ${testdir}/${conf})" -k stop || return 1
     41                ${APACHECTL} -f "$(realpath ${testdir}/${conf})" -k stop || return 1
    4142                ;;
    4243        esac
  • test/runtests

    r03295a9 r52c3f68  
    1313
    1414BADVARS=0
    15 for v in TEST_HOST TEST_IP TEST_PORT TEST_QUERY_DELAY TEST_GAP MSVA_PORT; do
     15for v in APACHECTL TEST_HOST TEST_IP TEST_PORT TEST_QUERY_DELAY TEST_GAP MSVA_PORT; do
    1616    if [ ! -v "$v" ]; then
    1717        printf "You need to set the %s environment variable\n" "$v" >&2
     
    8080function apache_down_err() {
    8181    printf "FAILURE: %s\n" "$TEST_NAME"
    82     /usr/sbin/apache2 -f "${t}/apache.conf" -k stop || true
     82    ${APACHECTL} -f "${t}/apache.conf" -k stop || true
    8383    if [ -e output ]; then
    8484        printf "\ngnutls-cli outputs:\n"
     
    139139        MONKEYSPHERE_VALIDATION_AGENT_SOCKET="http://127.0.0.1:$MSVA_PORT" \
    140140            ${flock_cmd} \
    141             /usr/sbin/apache2 -f "${t}/apache.conf" -k start \
     141            ${APACHECTL} -f "${t}/apache.conf" -k start \
    142142            || [ -e "${t}/fail.server" ]
    143143    else
    144144        ${flock_cmd} \
    145             /usr/sbin/apache2 -f "${t}/apache.conf" -k start \
     145            ${APACHECTL} -f "${t}/apache.conf" -k start \
    146146            || [ -e "${t}/fail.server" ]
    147147    fi
     
    183183        trap - EXIT
    184184    fi
    185     /usr/sbin/apache2 -f "${t}/apache.conf" -k stop || [ -e ${t}/fail.server ]
     185    ${APACHECTL} -f "${t}/apache.conf" -k stop || [ -e ${t}/fail.server ]
    186186    printf "SUCCESS: %s\n" "$TEST_NAME"
    187187done
Note: See TracChangeset for help on using the changeset viewer.