+++ /dev/null
-syntax(2)
-test_suite('isc-dhcp')
-
-include('client/Kyuafile')
-include('common/Kyuafile')
-include('server/Kyuafile')
doc/devel/arch.dox doc/devel/atf.dox doc/devel/contrib.dox \
doc/devel/debug.dox doc/devel/isc-logo.jpg doc/devel/libtool.dox \
doc/devel/mainpage.dox doc/devel/omapi.dox doc/devel/qa.dox \
- common/tests/Atffile server/tests/Atffile
+ client/tests/Atffile common/tests/Atffile server/tests/Atffile \
+ Kyuafile client/Kyuafile common/Kyuafile server/Kyuafile \
+ client/tests/Kyuafile common/tests/Kyuafile server/tests/Kyuafile
if HAVE_BINDDIR
EXTRA_DIST += bind/Makefile.in bind/bind.tar.gz bind/version.tmp
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+UNITTESTS = @UNITTESTS@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
doc/devel/atf.dox doc/devel/contrib.dox doc/devel/debug.dox \
doc/devel/isc-logo.jpg doc/devel/libtool.dox \
doc/devel/mainpage.dox doc/devel/omapi.dox doc/devel/qa.dox \
- common/tests/Atffile server/tests/Atffile $(am__append_1)
+ client/tests/Atffile common/tests/Atffile server/tests/Atffile \
+ Kyuafile client/Kyuafile common/Kyuafile server/Kyuafile \
+ client/tests/Kyuafile common/tests/Kyuafile \
+ server/tests/Kyuafile $(am__append_1)
# Use an autoconf substitution vs an automake conditional here
# to fool automake when the bind directory does not exist.
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir)
dist-bzip2: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
- shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
$(am__post_remove_distdir)
dist-zip: distdir
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
- GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
- GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
+++ /dev/null
-syntax(2)
-test_suite('isc-dhcp')
-
-include('tests/Kyuafile')
AM_CPPFLAGS += -DLOCALSTATEDIR='"."'
AM_CPPFLAGS += -DCLIENT_PATH='"."'
-EXTRA_DIST = Atffile duid0_test.txt duid1_test.txt duid2_test.txt duid3_test.txt
+EXTRA_DIST = Atffile Kyuafile
+EXTRA_DIST += duid0_test.txt duid1_test.txt duid2_test.txt duid3_test.txt
# for autotools debugging only
info:
check: $(ATF_TESTS)
@if test $(top_srcdir) != ${top_builddir}; then \
cp $(top_srcdir)/client/tests/Atffile Atffile; \
+ cp $(top_srcdir)/client/tests/Kyuafile Kyuafile; \
cp $(top_srcdir)/client/tests/duid0_test.txt duid0_test.txt; \
cp $(top_srcdir)/client/tests/duid1_test.txt duid1_test.txt; \
cp $(top_srcdir)/client/tests/duid2_test.txt duid2_test.txt; \
distclean-local:
@if test $(top_srcdir) != ${top_builddir}; then \
- rm -f Atffile duid0_test.txt duid1_test.txt; \
+ rm -f Atffile Kyuafile; \
+ rm -f duid0_test.txt duid1_test.txt; \
rm -f duid2_test.txt duid3_test.txt; \
fi
+++ /dev/null
-syntax(2)
-test_suite('isc-dhcp')
-
-include('tests/Kyuafile')
AM_CPPFLAGS = $(ATF_CFLAGS) -I$(top_srcdir)/includes
-EXTRA_DIST = Atffile
+EXTRA_DIST = Atffile Kyuafile
ATF_TESTS =
check: $(ATF_TESTS)
@if test $(top_srcdir) != ${top_builddir}; then \
cp $(top_srcdir)/common/tests/Atffile Atffile; \
+ cp $(top_srcdir)/common/tests/Kyuafile Kyuafile; \
fi
sh ${top_builddir}/tests/unittest.sh
distclean-local:
@if test $(top_srcdir) != ${top_builddir}; then \
- rm -f Atffile; \
+ rm -f Atffile Kyuafile; \
fi
endif
DISTCHECK_ATF_CONFIGURE_FLAG
HAVE_ATF_FALSE
HAVE_ATF_TRUE
+UNITTESTS
pkgcfg_found
ATF_BIN
ATF_LDFLAGS
ATF_BIN=$atf_path/bin
fi
- if test ! -x $ATF_BIN/atf-run -o ! -x $ATF_BIN/atf-report ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: atf-run/atf-report not found, assuming they are in your path" >&5
-$as_echo "$as_me: WARNING: atf-run/atf-report not found, assuming they are in your path" >&2;}
- fi
+ UNITTESTS=tests
+
ATF_BIN=$atf_path/bin
fi
- if test ! -x $ATF_BIN/atf-run -o ! -x $ATF_BIN/atf-report ; then
- AC_MSG_WARN([atf-run/atf-report not found, assuming they are in your path])
- fi
+ UNITTESTS=tests
AC_SUBST(ATF_CFLAGS)
AC_SUBST(ATF_LDFLAGS)
AC_SUBST(ATF_BIN)
+ AC_SUBST(UNITTESTS)
fi
fi
ATF_BIN=$atf_path/bin
fi
- if test ! -x $ATF_BIN/atf-run -o ! -x $ATF_BIN/atf-report ; then
- AC_MSG_WARN([atf-run/atf-report not found, assuming they are in your path])
- fi
+ UNITTESTS=tests
AC_SUBST(ATF_CFLAGS)
AC_SUBST(ATF_LDFLAGS)
AC_SUBST(ATF_BIN)
+ AC_SUBST(UNITTESTS)
fi
fi
ATF_BIN=$atf_path/bin
fi
- if test ! -x $ATF_BIN/atf-run -o ! -x $ATF_BIN/atf-report ; then
- AC_MSG_WARN([atf-run/atf-report not found, assuming they are in your path])
- fi
+ UNITTESTS=tests
AC_SUBST(ATF_CFLAGS)
AC_SUBST(ATF_LDFLAGS)
AC_SUBST(ATF_BIN)
+ AC_SUBST(UNITTESTS)
fi
fi
ATF_BIN=$atf_path/bin
fi
- if test ! -x $ATF_BIN/atf-run -o ! -x $ATF_BIN/atf-report ; then
- AC_MSG_WARN([atf-run/atf-report not found, assuming they are in your path])
- fi
+ UNITTESTS=tests
AC_SUBST(ATF_CFLAGS)
AC_SUBST(ATF_LDFLAGS)
AC_SUBST(ATF_BIN)
+ AC_SUBST(UNITTESTS)
fi
fi
+++ /dev/null
-syntax(2)
-test_suite('isc-dhcp')
-
-include('tests/Kyuafile')
AM_CPPFLAGS += -I@BINDDIR@/include -I$(top_srcdir)
AM_CPPFLAGS += -DLOCALSTATEDIR='"."'
-EXTRA_DIST = Atffile
+EXTRA_DIST = Atffile Kyuafile
# for autotools debugging only
info:
check: $(ATF_TESTS)
@if test $(top_srcdir) != ${top_builddir}; then \
cp $(top_srcdir)/server/tests/Atffile Atffile; \
+ cp $(top_srcdir)/server/tests/Kyuafile Kyuafile; \
fi
sh ${top_builddir}/tests/unittest.sh
distclean-local:
@if test $(top_srcdir) != ${top_builddir}; then \
- rm -f Atffile; \
+ rm -f Atffile Kyuafile; \
fi
endif
# Add configured path to ATF tools, atf-run and atf-report
PATH="@ATF_BIN@:${PATH}"
export PATH
+ATFRUN=`type atf-run 2>/dev/null | awk '{print $3}'`
+KYUA=`type kyua 2>/dev/null | awk '{print $3}'`
# colors if not outputting to a dumb terminal and stdout is a tty
if test "$TERM" != dumb && { test -t 1; } 2>/dev/null; then \
# (output will be "" if its supported)
if [ -z "`echo -e`" ]
then
- dash_e="-e"
+ dash_e="-e"
fi
fi;
header="===================================================="
status=0
-if [ -n "@ATF_BIN@" -a -f Atffile ]
+if [ -n "@UNITTESTS@" -a -x "$ATFRUN" -a -f Atffile ]
then
# run the tests
echo "Running unit tests..."
# set color based on success/failure
if [ $status -eq 0 ]
then
- color=$green
+ color=$green
else
- color=$red
+ color=$red
fi
# spit out the test report
# result color.
cat atf.out | atf-report | while read line
do
- cnt=`echo $line | grep -c "Summary"`
- if [ $cnt -eq 1 ]
- then
- echo $dash_e $color$header
- fi
- echo $line;
+ cnt=`echo $line | grep -c "Summary"`
+ if [ $cnt -eq 1 ]
+ then
+ echo $dash_e $color$header
+ fi
+ echo $line;
done
echo $dash_e $header$noclr
# clean up unless there were test failures
if [ $status -eq 0 ]
then
- rm -f atf.out
+ rm -f atf.out
+ fi
+elif [ -n "@UNITTESTS@" -a -x "$KYUA" -a -f Kyuafile ]
+then
+ echo "Running unit tests..."
+ kyua --logfile kyua.log test
+ status=$?
+
+ kyua report
+
+ if [ $status -eq 0 ]
+ then
+ rm -f kyua.log
fi
fi
exit $status