Changeset 412ee84 in mod_gnutls for test/proxy_backend.bash


Ignore:
Timestamp:
Nov 25, 2015, 7:05:35 PM (4 years ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, upstream
Children:
dff57b4
Parents:
a08b25e
Message:

Test suite: Allow the user to disable use of "flock"

Using "flock" causes trouble on some exotic architectures (e.g. Hurd),
so allow disabling it. Running without lock files requires serial
execution of test cases to achieve reliable results.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/proxy_backend.bash

    ra08b25e r412ee84  
    22
    33set -e
     4. ${srcdir}/common.bash
    45
    56if [ -z "${BACKEND_HOST}" ]; then
     
    1213    export BACKEND_PORT="9934"
    1314fi
    14 : ${BACKEND_LOCK:="backend.lock"}
     15: ${BACKEND_PID:="backend.pid"}
    1516: ${srcdir:="."}
    1617: ${APACHE2:="apache2"}
     
    2425    lockfile="${4}"
    2526
    26     if [ -n "${lockfile}" ]; then
    27         flock_cmd="flock -w ${TEST_LOCK_WAIT} ${lockfile}"
    28     fi
    29 
    3027    TEST_NAME="$(basename "${dir}")"
    3128    (
     
    3633        case $action in
    3734            start)
     35                if [ -n "${lockfile}" ]; then
     36                    flock_cmd="${FLOCK} -w ${TEST_LOCK_WAIT} ${lockfile}"
     37                else
     38                    echo "Locking disabled, using wait based on proxy PID file."
     39                    wait_pid_gone "${BACKEND_PID}"
     40                    flock_cmd=""
     41                fi
    3842                ${flock_cmd} \
    3943                    ${APACHE2} -f "$(realpath ${testdir}/${conf})" -k start || return 1
Note: See TracChangeset for help on using the changeset viewer.