Commit d242c32c authored by Geoff Simmons's avatar Geoff Simmons

varnishevent: adding make check tests

parent 057dcfd7
......@@ -2,6 +2,8 @@
INCLUDES = -I$(top_srcdir)/include
SUBDIRS = test
bin_PROGRAMS = varnishevent
dist_man_MANS = varnishevent.1
......
#!/bin/bash
# Outputs of varnishevent and varnishncsa for client formats are
# identical, except that varnishevent emits empty strings for data
# from headers that are empty, and varnishnca emits a '-'.
echo
echo "TEST: $0"
echo "... testing (near) equivalence of output with varnishncsa"
EVENT="../varnishevent"
NCSA="../../varnishncsa/varnishncsa"
EVENT_CKSUM=$( $EVENT -r varnish.binlog | sed 's/-//g' | cksum)
NCSA_CKSUM=$( $NCSA -r varnish.binlog | sed 's/-//g' | cksum)
if [ "$EVENT_CKSUM" != "$NCSA_CKSUM" ]; then
echo "ERROR: cksums of no-arg varnishevent and varnishncsa differ"
echo "varnishevent cksum = $EVENT_CKSUM"
echo "varnishncsa cksum = $NCSA_CKSUM"
exit 1
fi
EVENT_CKSUM=$( $EVENT -r varnish.binlog -f | sed 's/-//g' | cksum)
NCSA_CKSUM=$( $NCSA -r varnish.binlog -f | sed 's/-//g' | cksum)
if [ "$EVENT_CKSUM" != "$NCSA_CKSUM" ]; then
echo "ERROR: cksums of no-arg varnishevent/varnishncsa -f differ"
echo "varnishevent cksum = $EVENT_CKSUM"
echo "varnishncsa cksum = $NCSA_CKSUM"
exit 1
fi
exit 0
......@@ -563,6 +563,7 @@ AC_CONFIG_FILES([
bin/varnishadm/Makefile
bin/varnishd/Makefile
bin/varnishevent/Makefile
bin/varnishevent/test/Makefile
bin/varnishlog/Makefile
bin/varnishhist/Makefile
bin/varnishncsa/Makefile
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment