tests: add basic tests

The tests can be ran using 'make check'.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2012-11-29 19:58:38 +00:00
parent 6684772550
commit 71bcee14e9
17 changed files with 134 additions and 1 deletions

15
tests/test.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/sh
#
# Minimal regression test suite.
TEST_TOPDIR=$(cd $(dirname $0) && pwd)
IAM=$(basename $0)
DHCPD_POOLS=$(readlink -f $TEST_TOPDIR/../src/dhcpd-pools)
if [ ! -d outputs ]; then
mkdir outputs
fi
$DHCPD_POOLS -c confs/$IAM -l leases/$IAM -o outputs/$IAM
diff -q expected/$IAM outputs/$IAM >/dev/null
exit $?