Skip to content

Commit

Permalink
Fix the rec_control manual test
Browse files Browse the repository at this point in the history
Ensure it does not fail silently on no output from rec_control

Closes #3944
  • Loading branch information
pieterlexis committed Jun 23, 2016
1 parent 81cc5b0 commit 1cedb84
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
11 changes: 9 additions & 2 deletions regression-tests.recursor/rec_control-manpage/command
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions regression-tests/runtests
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
4 changes: 2 additions & 2 deletions regression-tests/start-test-stop
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 1cedb84

Please sign in to comment.