asynciodebian/masterdebian/stretch-backportsjessie-backportsproxy-ticketupstream
Last change
on this file since 28f3f4f was
33af2b7,
checked in by Thomas Klute <thomas2.klute@…>, 6 years ago
|
Test suite: Add tests to "dist" target and support VPATH builds
Supporting VPATH builds requires using $srcdir to find non-generated
data rather than fixed relative paths. If test are not called through
the make system, local defaults must be used. Not changing directories
during tests any more makes this easier.
A few files (e.g. templates, generated CRL) have been moved around to
better match the new structure.
|
-
Property mode set to
100644
|
File size:
858 bytes
|
Line | |
---|
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 |
---|
14 | : ${BACKEND_LOCK:="backend.lock"} |
---|
15 | : ${srcdir:="."} |
---|
16 | |
---|
17 | function backend_apache |
---|
18 | { |
---|
19 | dir="${1}" |
---|
20 | conf="${2}" |
---|
21 | action="${3}" |
---|
22 | lockfile="${4}" |
---|
23 | |
---|
24 | if [ -n "${lockfile}" ]; then |
---|
25 | flock_cmd="flock -w 10 ${lockfile}" |
---|
26 | fi |
---|
27 | |
---|
28 | TEST_NAME="$(basename "${dir}")" |
---|
29 | ( |
---|
30 | export TEST_NAME |
---|
31 | export TEST_IP="${BACKEND_IP}" |
---|
32 | export TEST_PORT="${BACKEND_PORT}" |
---|
33 | export srcdir="$(realpath ${srcdir})" |
---|
34 | case $action in |
---|
35 | start) |
---|
36 | ${flock_cmd} \ |
---|
37 | /usr/sbin/apache2 -f "$(realpath ${testdir}/${conf})" -k start || return 1 |
---|
38 | ;; |
---|
39 | stop) |
---|
40 | /usr/sbin/apache2 -f "$(realpath ${testdir}/${conf})" -k stop || return 1 |
---|
41 | ;; |
---|
42 | esac |
---|
43 | ) |
---|
44 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.