summaryrefslogtreecommitdiff
path: root/scripts/run-single-test.sh
blob: 210cf58c0949160ff103ac17cdf8cad072a943cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash

END=$((SECONDS+15))

mod_wsgi-express setup-server tests/environ.wsgi \
    --server-root httpd-test --log-level info

trap "httpd-test/apachectl stop" EXIT

touch httpd-test/error_log

tail -f httpd-test/error_log &

httpd-test/apachectl start

while [ ! -f httpd-test/httpd.pid ]; do
    if [ $SECONDS -gt $END ]; then
        echo 'Failed'
        exit 1
    fi

    echo 'Waiting...'
    sleep 1
done

sleep 2

curl --silent --verbose --fail --show-error http://localhost:8000