Changes in test/runtests [a61edfd:28fc74b] in mod_gnutls


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/runtests

    ra61edfd r28fc74b  
    66
    77set -e
     8. ${srcdir}/common.bash
     9netns_reexec ${@}
    810
    911testid="${1##t-}"
     
    1719
    1820BADVARS=0
    19 for v in APACHE2 TEST_HOST TEST_IP TEST_PORT TEST_QUERY_DELAY TEST_MSVA_WAIT \
    20                  MSVA_PORT TEST_LOCK; do
     21for v in APACHE2 TEST_HOST TEST_PORT TEST_QUERY_DELAY TEST_MSVA_WAIT \
     22                 MSVA_PORT; do
    2123    if [ ! -v "$v" ]; then
    2224        printf "You need to set the %s environment variable\n" "$v" >&2
     
    150152fi
    151153
     154TEST_PID="apache2.pid"
    152155# configure locking for the Apache process
    153 flock_cmd="flock -w ${TEST_LOCK_WAIT} $(realpath ${TEST_LOCK})"
     156if [ -n "${USE_TEST_NAMESPACE}" ]; then
     157    echo "Using namespaces to isolate tests, no need for locking."
     158    flock_cmd=""
     159elif [ -n "${TEST_LOCK}" ]; then
     160    flock_cmd="${FLOCK} -w ${TEST_LOCK_WAIT} $(realpath ${TEST_LOCK})"
     161else
     162    echo "Locking disabled, using wait based on Apache PID file."
     163    wait_pid_gone "${TEST_PID}"
     164    flock_cmd=""
     165fi
    154166
    155167t="$(realpath ${testid})"
     
    189201           run_with_pidfile "${sleep_pidfile}" sleep "${TEST_QUERY_DELAY}" &) | \
    190202       gnutls-cli -p "${TEST_PORT}" $(cat ${t}/gnutls-cli.args) "${TEST_HOST}" \
    191                   >"$output";
     203       | tee "$output" && test "${PIPESTATUS[1]}" -eq 0;
    192204then
    193205    if [ -e ${t}/fail* ]; then
     
    206218
    207219if [ -e ${t}/output ] ; then
    208     diff_output_filter_headers "${t}/output" "$output" "-q"
     220    diff_output_filter_headers "${t}/output" "$output" >&2
    209221fi
    210222if [ -n "${USE_MSVA}" ]; then
Note: See TracChangeset for help on using the changeset viewer.