tests: fix make distcheck

It is best to make dhcpd-pools used from PATH, which makes out of tree
build check to work.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2013-01-15 20:23:32 +00:00
parent 34f73dbae1
commit e50d0a7d38
3 changed files with 15 additions and 19 deletions

View file

@ -1,13 +1,3 @@
EXTRA_DIST = \
bootp \
full-json \
confs \
expected \
leading0 \
leases \
same-twice \
simple
TESTS = \
bootp \
full-json \
@ -16,6 +6,14 @@ TESTS = \
simple \
v6
EXTRA_DIST = \
confs \
expected \
leases \
$(TESTS)
TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) PATH=../src$(PATH_SEPARATOR)$$PATH
check-local: $(SHELL) $(top_srcdir)/tests/test.sh
clean-local:

View file

@ -2,13 +2,12 @@
#
# Minimal regression test suite.
TEST_TOPDIR=$(cd $(dirname $0) && pwd)
DHCPD_POOLS=$(readlink -f $TEST_TOPDIR/../src/dhcpd-pools)
if [ ! -d outputs ]; then
mkdir outputs
fi
$DHCPD_POOLS -f J -c confs/same-twice -l leases/same-twice -o outputs/same-twice-json
diff -u expected/same-twice-json outputs/same-twice-json
dhcpd-pools -f J -c $top_srcdir/tests/confs/same-twice \
-l $top_srcdir/tests/leases/same-twice \
-o outputs/same-twice-json
diff -u $top_srcdir/tests/expected/same-twice-json outputs/same-twice-json
exit $?

View file

@ -2,14 +2,13 @@
#
# 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 -u expected/$IAM outputs/$IAM
dhcpd-pools -c $top_srcdir/tests/confs/$IAM \
-l $top_srcdir/tests/leases/$IAM -o outputs/$IAM
diff -u $top_srcdir/tests/expected/$IAM outputs/$IAM
exit $?