From: Pieter Lexis Date: Thu, 23 Jun 2016 14:40:05 +0000 (+0200) Subject: Fix the rec_control manual test X-Git-Tag: auth-4.0.0-rc1~17^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1cedb8486ba1dff14fbc07c8e08964209f8a6f7b;p=thirdparty%2Fpdns.git Fix the rec_control manual test Ensure it does not fail silently on no output from rec_control Closes #3944 --- diff --git a/regression-tests.recursor/rec_control-manpage/command b/regression-tests.recursor/rec_control-manpage/command index de6ec8772b..bbcaa9e770 100755 --- a/regression-tests.recursor/rec_control-manpage/command +++ b/regression-tests.recursor/rec_control-manpage/command @@ -1,12 +1,19 @@ #!/bin/sh -elements="$($RECCONTROL --config-dir=./config/recursor-service help | grep -v -e '^ ' | awk '{print $1}')" +elements="$($RECCONTROL --config-dir=./configs/recursor-service help | grep -v -e '^ ' | awk '{print $1}')" + +num_elems="$( echo $elements | wc -l)" + +if [ $num_elems -lt 5 ]; then + echo "Not enough elements" + exit 1 +fi missing_elements="" for element in $elements; do grep -e -q "^$element" ../docs/manpages/rec_control.1.md || missing_elements="$element\n$missing_elements" done -if [ $missing_elements != "" ]; then +if [ "x$missing_elements" != "x" ]; then echo "The following commands are missing from the manpage:\n" echo $missing_elements fi diff --git a/regression-tests/runtests b/regression-tests/runtests index 45f11992f8..e0edbffdc2 100755 --- a/regression-tests/runtests +++ b/regression-tests/runtests @@ -4,8 +4,8 @@ MAKE=${MAKE:-make} export PDNS=${PDNS:-${PWD}/../pdns/pdns_server} export PDNS2=${PDNS2:-${PWD}/../pdns/pdns_server} -export PDNSRECURSOR=${PDNSRECURSOR:-${PWD}/../pdns_recursor} -export RECCONTROL=${RECCONTROL:-${PWD}/../rec_control} +export PDNSRECURSOR=${PDNSRECURSOR:-${PWD}/../pdns/recursordist/pdns_recursor} +export RECCONTROL=${RECCONTROL:-${PWD}/../pdns/recursordist/rec_control} export SDIG=${SDIG:-${PWD}/../pdns/sdig} export NOTIFY=${NOTIFY:-${PWD}/../pdns/pdns_notify} export NSEC3DIG=${NSEC3DIG:-${PWD}/../pdns/nsec3dig} diff --git a/regression-tests/start-test-stop b/regression-tests/start-test-stop index 600484c93e..b11d6d2650 100755 --- a/regression-tests/start-test-stop +++ b/regression-tests/start-test-stop @@ -6,8 +6,8 @@ fi export PDNS=${PDNS:-${PWD}/../pdns/pdns_server} export PDNS2=${PDNS2:-${PWD}/../pdns/pdns_server} -export PDNSRECURSOR=${PDNSRECURSOR:-${PWD}/../pdns_recursor} -export RECCONTROL=${RECCONTROL:-${PWD}/../rec_control} +export PDNSRECURSOR=${PDNSRECURSOR:-${PWD}/../pdns/recursordist/pdns_recursor} +export RECCONTROL=${RECCONTROL:-${PWD}/../pdns/recursordist/rec_control} export SDIG=${SDIG:-${PWD}/../pdns/sdig} export NOTIFY=${NOTIFY:-${PWD}/../pdns/pdns_notify} export NSEC3DIG=${NSEC3DIG:-${PWD}/../pdns/nsec3dig}