From: Aki Tuomi Date: Mon, 10 Jun 2013 21:01:21 +0000 (+0300) Subject: Make sure pdns can be started and that it did indeed start X-Git-Tag: rec-3.6.0-rc1~685^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a3a4cb13d747f9deeeb2ce0e36c462e7b3cba5ed;p=thirdparty%2Fpdns.git Make sure pdns can be started and that it did indeed start --- diff --git a/regression-tests/start-test-stop b/regression-tests/start-test-stop index 108a618bf1..26bf533487 100755 --- a/regression-tests/start-test-stop +++ b/regression-tests/start-test-stop @@ -12,6 +12,7 @@ tosql () bindwait () { + check_process configname=$1 domcount=$(grep -c zone named.conf) while sleep 10 @@ -45,6 +46,32 @@ securezone () fi } +check_process () +{ + set +e + pids=$(cat pdns*.pid 2>/dev/null) + if [ -z "$pids" ]; then + echo "PowerDNS did not start" + exit 1 + fi + kill -0 $pids >/dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "PowerDNS did not start" + exit 1 + fi + set -e +} + +if [ ! -x $PDNS ]; then + echo "$PDNS is not executable binary" + exit 1 +fi + +if [ ! -x $PDNS2 ]; then + echo "$PDNS2 is not executable binary" + exit 1 +fi + port=$1 [ -z "$port" ] && port=5300 context=$2 @@ -555,7 +582,9 @@ EOF ./toxml $context exit 1 esac - + +check_process + export port export context export extracontexts