Changeset cdc6e4a in mod_gnutls


Ignore:
Timestamp:
Sep 11, 2017, 2:29:42 AM (3 months ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
master
Children:
732c5733
Parents:
b8b1990
Message:

Choose flock or PID wait based on availability, not file parameter presence

Location:
test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • test/proxy_backend.bash

    r342e11d rcdc6e4a  
    1717function backend_apache
    1818{
     19    # needed for start and stop
    1920    dir="${1}"
    2021    conf="${2}"
    2122    action="${3}"
     23    # needed only for start
    2224    lockfile="${4}"
    2325
     
    2729        export TEST_PORT="${BACKEND_PORT}"
    2830        export srcdir="$(realpath ${srcdir})"
    29         case $action in
     31        local flock_cmd=""
     32        case ${action} in
    3033            start)
    3134                if [ -n "${USE_TEST_NAMESPACE}" ]; then
    3235                    echo "Using namespaces to isolate tests, no need for" \
    3336                         "locking."
    34                     flock_cmd=""
    35                 elif [ -n "${lockfile}" ]; then
     37                elif [ -n "${FLOCK}" ]; then
    3638                    flock_cmd="${FLOCK} -w ${TEST_LOCK_WAIT} ${lockfile}"
    3739                else
    3840                    echo "Locking disabled, using wait based on proxy PID file."
    3941                    wait_pid_gone "${BACKEND_PID}"
    40                     flock_cmd=""
    4142                fi
    4243                ${flock_cmd} \
     
    4647                ${APACHE2} -f "$(realpath ${testdir}/${conf})" -k stop || return 1
    4748                ;;
     49            *)
     50                echo "${FUNCNAME[0]}: Invalid action \"${action}\"." >&2
     51                exit 1
     52                ;;
    4853        esac
    4954    )
  • test/runtests

    r4fb510d rcdc6e4a  
    144144    echo "Using namespaces to isolate tests, no need for locking."
    145145    flock_cmd=""
    146 elif [ -n "${TEST_LOCK}" ]; then
     146elif [ -n "${FLOCK}" ]; then
    147147    flock_cmd="${FLOCK} -w ${TEST_LOCK_WAIT} $(realpath ${TEST_LOCK})"
    148148else
Note: See TracChangeset for help on using the changeset viewer.