Changeset 412ee84 in mod_gnutls
- Timestamp:
- Nov 25, 2015, 7:05:35 PM (7 years ago)
- Branches:
- asyncio, debian/master, debian/stretch-backports, jessie-backports, master, proxy-ticket, upstream
- Children:
- dff57b4
- Parents:
- a08b25e
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
configure.ac
ra08b25e r412ee84 59 59 AC_MSG_CHECKING([whether to enable SRP functionality]) 60 60 AC_MSG_RESULT($use_srp) 61 62 dnl Optionally disable flock 63 AC_ARG_ENABLE(flock, 64 AS_HELP_STRING([--disable-flock], [Disable use of flock during tests]), 65 [use_flock=$enableval], [use_flock=yes]) 66 dnl If flock is not disabled, make sure it's available 67 if test "$enable_flock" != "no"; then 68 AC_PATH_PROG([FLOCK], [flock], [no]) 69 use_flock=${FLOCK} 70 fi 71 AM_CONDITIONAL([DISABLE_FLOCK], [test "$enable_flock" = "no"]) 61 72 62 73 AC_ARG_ENABLE(msva, -
test/Makefile.am
ra08b25e r412ee84 127 127 # Lockfile for the main Apache process 128 128 test_lockfile = ./test.lock 129 # Maximum wait time in seconds for flock to aquire instance lock files 129 # Lockfile for the proxy backend Apache process (if any) 130 backend_lockfile = ./backend.lock 131 # Maximum wait time in seconds for flock to aquire instance lock 132 # files, or Apache to remove its PID file 130 133 lock_wait = 30 131 134 … … 143 146 AM_TESTS_ENVIRONMENT = export APACHE2=$(APACHE2); \ 144 147 export AP_LIBEXECDIR=$(AP_LIBEXECDIR); \ 145 export TEST_LOCK="$(test_lockfile)"; \146 148 export TEST_LOCK_WAIT="$(lock_wait)"; \ 147 149 export TEST_HOST="$(TEST_HOST)"; \ … … 153 155 export BACKEND_HOST="$(TEST_HOST)"; 154 156 157 # Without flock tests must not run in parallel. Otherwise set lock files. 158 if DISABLE_FLOCK 159 .NOTPARALLEL: 160 else 161 AM_TESTS_ENVIRONMENT += export FLOCK="$(FLOCK)"; \ 162 export TEST_LOCK="$(test_lockfile)"; \ 163 export BACKEND_LOCK="$(backend_lockfile)"; 164 endif 165 155 166 # Echo AM_TESTS_ENVIRONMENT. This can be useful for debugging, e.g. if 156 167 # you want to manually run an Apache instance with Valgrind using the -
test/proxy_backend.bash
ra08b25e r412ee84 2 2 3 3 set -e 4 . ${srcdir}/common.bash 4 5 5 6 if [ -z "${BACKEND_HOST}" ]; then … … 12 13 export BACKEND_PORT="9934" 13 14 fi 14 : ${BACKEND_ LOCK:="backend.lock"}15 : ${BACKEND_PID:="backend.pid"} 15 16 : ${srcdir:="."} 16 17 : ${APACHE2:="apache2"} … … 24 25 lockfile="${4}" 25 26 26 if [ -n "${lockfile}" ]; then27 flock_cmd="flock -w ${TEST_LOCK_WAIT} ${lockfile}"28 fi29 30 27 TEST_NAME="$(basename "${dir}")" 31 28 ( … … 36 33 case $action in 37 34 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 38 42 ${flock_cmd} \ 39 43 ${APACHE2} -f "$(realpath ${testdir}/${conf})" -k start || return 1 -
test/runtests
ra08b25e r412ee84 6 6 7 7 set -e 8 . ${srcdir}/common.bash 8 9 9 10 testid="${1##t-}" … … 18 19 BADVARS=0 19 20 for v in APACHE2 TEST_HOST TEST_PORT TEST_QUERY_DELAY TEST_MSVA_WAIT \ 20 MSVA_PORT TEST_LOCK; do21 MSVA_PORT; do 21 22 if [ ! -v "$v" ]; then 22 23 printf "You need to set the %s environment variable\n" "$v" >&2 … … 150 151 fi 151 152 153 TEST_PID="apache2.pid" 152 154 # configure locking for the Apache process 153 flock_cmd="flock -w ${TEST_LOCK_WAIT} $(realpath ${TEST_LOCK})" 155 if [ -n "${TEST_LOCK}" ]; then 156 flock_cmd="${FLOCK} -w ${TEST_LOCK_WAIT} $(realpath ${TEST_LOCK})" 157 else 158 echo "Locking disabled, using wait based on Apache PID file." 159 wait_pid_gone "${TEST_PID}" 160 flock_cmd="" 161 fi 154 162 155 163 t="$(realpath ${testid})"
Note: See TracChangeset
for help on using the changeset viewer.