tests.sh revision 3635d8f9104e70e141a8f191a0e6c1502ceed2f3
#
# Copyright (C) 2015, 2016 Internet Systems Consortium, Inc. ("ISC")
#
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
if [ ! "$JSONSTATS" ]
then
unset PERL_JSON
echo "I:JSON was not configured; skipping" >&2
then
else
unset PERL_JSON
echo "I:JSON tests require JSON library; skipping" >&2
fi
if [ ! "$XMLSTATS" ]
then
unset PERL_XML
echo "I:XML was not configured; skipping" >&2
then
PERL_XML=1
else
unset PERL_XML
echo "I:XML tests require XML::Simple; skipping" >&2
fi
if [ ! "$PERL_JSON" -a ! "$PERL_XML" ]; then
echo "I:skipping all tests"
exit 0
fi
echo "I:... using $1"
case $1 in
*) return 1 ;;
esac
result=$?
return $result
}
status=0
n=1
ret=0
echo "I:fetching traffic size data ($n)"
if [ $PERL_XML ]; then
fi
if [ $PERL_JSON ]; then
fi
n=`expr $n + 1`
ret=0
echo "I:fetching traffic size data after small UDP query ($n)"
if [ $PERL_XML ]; then
fi
if [ $PERL_JSON ]; then
fi
n=`expr $n + 1`
ret=0
n=`expr $n + 1`
echo "I:fetching traffic size data after large UDP query ($n)"
if [ $PERL_XML ]; then
fi
if [ $PERL_JSON ]; then
fi
n=`expr $n + 1`
ret=0
echo "I:fetching traffic size data after small TCP query ($n)"
if [ $PERL_XML ]; then
fi
if [ $PERL_JSON ]; then
fi
n=`expr $n + 1`
ret=0
echo "I:fetching traffic size data after large TCP query ($n)"
if [ $PERL_XML ]; then
fi
if [ $PERL_JSON ]; then
fi
n=`expr $n + 1`
ret=0
echo "I:checking consistency between named.stats and xml/json ($n)"
if [ $PERL_XML ]; then
fi
if [ $PERL_JSON ]; then
fi
n=`expr $n + 1`
ret=0
echo "I:checking consistency between regular and compressed output ($n)"
if [ "$XMLSTATS" ];
then
else
fi
n=`expr $n + 1`
ret=0
echo "I:checking if compressed output is really compressed ($n)"
if [ "$ZLIB" ];
then
REGSIZE=`cat regular.headers | \
ret=1
fi
else
echo "I:skipped"
fi
n=`expr $n + 1`
echo "I:exit status: $status"