4487. [test] Make system tests work on Windows. [RT #42931]
This commit is contained in:
@@ -57,6 +57,7 @@ echo "I:dumping initial stats for ns3"
|
||||
rm -f ns3/named.stats
|
||||
$RNDCCMD -s 10.53.0.3 stats > /dev/null 2>&1
|
||||
[ -f ns3/named.stats ] || ret=1
|
||||
[ "$CYGWIN" ] || \
|
||||
nsock0nstat=`grep "UDP/IPv4 sockets active" ns3/named.stats | awk '{print $1}'`
|
||||
|
||||
echo "I:sending queries to ns3"
|
||||
@@ -84,14 +85,16 @@ if [ $ret != 0 ]; then echo "I: failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
|
||||
echo "I: verifying active sockets output in named.stats"
|
||||
nsock1nstat=`grep "UDP/IPv4 sockets active" ns3/named.stats | awk '{print $1}'`
|
||||
if [ ! "$CYGWIN" ]; then
|
||||
echo "I: verifying active sockets output in named.stats"
|
||||
nsock1nstat=`grep "UDP/IPv4 sockets active" ns3/named.stats | awk '{print $1}'`
|
||||
|
||||
ret=0
|
||||
[ `expr $nsock1nstat - $nsock0nstat` -eq 1 ] || ret=1
|
||||
if [ $ret != 0 ]; then echo "I: failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
ret=0
|
||||
[ `expr $nsock1nstat - $nsock0nstat` -eq 1 ] || ret=1
|
||||
if [ $ret != 0 ]; then echo "I: failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
n=`expr $n + 1`
|
||||
fi
|
||||
|
||||
ret=0
|
||||
# there should be 1 UDP and no TCP queries. As the TCP counter is zero
|
||||
@@ -113,7 +116,7 @@ n=`expr $n + 1`
|
||||
ret=0
|
||||
n=`expr $n + 1`
|
||||
echo "I:checking that zones with slash are properly shown in XML output ($n)"
|
||||
if ./xmlstats && [ -x ${CURL} ] ; then
|
||||
if $XMLSTATS && [ -x ${CURL} ] ; then
|
||||
${CURL} http://10.53.0.1:8053/xml/v3/zones > curl.out.${t} 2>/dev/null || ret=1
|
||||
grep '<zone name="32/1.0.0.127-in-addr.example" rdataclass="IN">' curl.out.${t} > /dev/null || ret=1
|
||||
else
|
||||
@@ -125,7 +128,7 @@ status=`expr $status + $ret`
|
||||
ret=0
|
||||
n=`expr $n + 1`
|
||||
echo "I:checking that zones return their type ($n)"
|
||||
if ./xmlstats && [ -x ${CURL} ] ; then
|
||||
if $XMLSTATS && [ -x ${CURL} ] ; then
|
||||
${CURL} http://10.53.0.1:8053/xml/v3/zones > curl.out.${t} 2>/dev/null || ret=1
|
||||
grep '<zone name="32/1.0.0.127-in-addr.example" rdataclass="IN"><type>master</type>' curl.out.${t} > /dev/null || ret=1
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user