asynciodebian/masterdebian/stretch-backportsjessie-backportsproxy-ticketupstream
Last change
on this file since 5d85ad3 was
50eab8e,
checked in by Thomas Klute <thomas2.klute@…>, 6 years ago
|
Test suite: Configure max wait time for instance locks from Makefile.am
The increased maximum (30 seconds) should help to avoid false failures
with parallel builds on slow systems.
|
-
Property mode set to
100644
|
File size:
909 bytes
|
Rev | Line | |
---|
[f84890d] | 1 | #!/bin/bash |
---|
| 2 | |
---|
| 3 | set -e |
---|
| 4 | |
---|
| 5 | if [ -z "${BACKEND_HOST}" ]; then |
---|
| 6 | export BACKEND_HOST="localhost" |
---|
| 7 | fi |
---|
| 8 | if [ -z "${BACKEND_IP}" ]; then |
---|
| 9 | export BACKEND_IP="::1" |
---|
| 10 | fi |
---|
| 11 | if [ -z "${BACKEND_PORT}" ]; then |
---|
| 12 | export BACKEND_PORT="9934" |
---|
| 13 | fi |
---|
[33af2b7] | 14 | : ${BACKEND_LOCK:="backend.lock"} |
---|
| 15 | : ${srcdir:="."} |
---|
[af7da2d] | 16 | : ${APACHE2:="apache2"} |
---|
[50eab8e] | 17 | : ${TEST_LOCK_WAIT:="30"} |
---|
[f84890d] | 18 | |
---|
| 19 | function backend_apache |
---|
| 20 | { |
---|
| 21 | dir="${1}" |
---|
| 22 | conf="${2}" |
---|
| 23 | action="${3}" |
---|
| 24 | lockfile="${4}" |
---|
| 25 | |
---|
| 26 | if [ -n "${lockfile}" ]; then |
---|
[50eab8e] | 27 | flock_cmd="flock -w ${TEST_LOCK_WAIT} ${lockfile}" |
---|
[f84890d] | 28 | fi |
---|
| 29 | |
---|
| 30 | TEST_NAME="$(basename "${dir}")" |
---|
| 31 | ( |
---|
| 32 | export TEST_NAME |
---|
| 33 | export TEST_IP="${BACKEND_IP}" |
---|
| 34 | export TEST_PORT="${BACKEND_PORT}" |
---|
[33af2b7] | 35 | export srcdir="$(realpath ${srcdir})" |
---|
[f84890d] | 36 | case $action in |
---|
| 37 | start) |
---|
| 38 | ${flock_cmd} \ |
---|
[af7da2d] | 39 | ${APACHE2} -f "$(realpath ${testdir}/${conf})" -k start || return 1 |
---|
[f84890d] | 40 | ;; |
---|
| 41 | stop) |
---|
[af7da2d] | 42 | ${APACHE2} -f "$(realpath ${testdir}/${conf})" -k stop || return 1 |
---|
[f84890d] | 43 | ;; |
---|
| 44 | esac |
---|
| 45 | ) |
---|
| 46 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.