Changeset 412ee84 in mod_gnutls for test/runtests


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/runtests

    ra08b25e r412ee84  
    66
    77set -e
     8. ${srcdir}/common.bash
    89
    910testid="${1##t-}"
     
    1819BADVARS=0
    1920for v in APACHE2 TEST_HOST TEST_PORT TEST_QUERY_DELAY TEST_MSVA_WAIT \
    20                  MSVA_PORT TEST_LOCK; do
     21                 MSVA_PORT; do
    2122    if [ ! -v "$v" ]; then
    2223        printf "You need to set the %s environment variable\n" "$v" >&2
     
    150151fi
    151152
     153TEST_PID="apache2.pid"
    152154# configure locking for the Apache process
    153 flock_cmd="flock -w ${TEST_LOCK_WAIT} $(realpath ${TEST_LOCK})"
     155if [ -n "${TEST_LOCK}" ]; then
     156    flock_cmd="${FLOCK} -w ${TEST_LOCK_WAIT} $(realpath ${TEST_LOCK})"
     157else
     158    echo "Locking disabled, using wait based on Apache PID file."
     159    wait_pid_gone "${TEST_PID}"
     160    flock_cmd=""
     161fi
    154162
    155163t="$(realpath ${testid})"
Note: See TracChangeset for help on using the changeset viewer.