Changeset 52c3f68 in mod_gnutls for test/runtests


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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.