summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2017-12-30 17:49:14 +0100
committerFrancis Dupont <fdupont@isc.org>2017-12-30 17:49:14 +0100
commit6b87c7f213bea62a545169286acdd5d2b66ae082 (patch)
tree900e62085171c851f220f6e9d1928497b94d6f3d
parente3318080eea68223bcbdb0beef6157a51cd7b180 (diff)
downloadisc-dhcp-6b87c7f213bea62a545169286acdd5d2b66ae082.tar.gz
checkpoint for regen
-rw-r--r--Kyuafile6
-rw-r--r--Makefile.am4
-rw-r--r--Makefile.in18
-rw-r--r--client/Kyuafile4
-rw-r--r--client/tests/Makefile.am7
-rw-r--r--common/Kyuafile4
-rw-r--r--common/tests/Makefile.am5
-rwxr-xr-xconfigure7
-rw-r--r--configure.ac5
-rw-r--r--configure.ac+lt5
-rw-r--r--configure.ac-base5
-rw-r--r--configure.ac-lt5
-rw-r--r--server/Kyuafile4
-rw-r--r--server/tests/Makefile.am5
-rwxr-xr-xtests/unittest.sh.in36
15 files changed, 61 insertions, 59 deletions
diff --git a/Kyuafile b/Kyuafile
deleted file mode 100644
index 3093c38e..00000000
--- a/Kyuafile
+++ /dev/null
@@ -1,6 +0,0 @@
-syntax(2)
-test_suite('isc-dhcp')
-
-include('client/Kyuafile')
-include('common/Kyuafile')
-include('server/Kyuafile')
diff --git a/Makefile.am b/Makefile.am
index e78b328f..66d4b160 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -28,7 +28,9 @@ EXTRA_DIST = RELNOTES LICENSE configure.ac+lt config+lt \
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
diff --git a/Makefile.in b/Makefile.in
index db6b0193..2d986d6f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
-# 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,
@@ -301,6 +301,7 @@ RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+UNITTESTS = @UNITTESTS@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
@@ -382,7 +383,10 @@ EXTRA_DIST = RELNOTES LICENSE configure.ac+lt config+lt \
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.
@@ -620,7 +624,7 @@ distdir: $(DISTFILES)
! -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
@@ -646,7 +650,7 @@ dist-shar: 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
@@ -664,7 +668,7 @@ dist dist-all:
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*) \
@@ -674,7 +678,7 @@ distcheck: dist
*.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
diff --git a/client/Kyuafile b/client/Kyuafile
deleted file mode 100644
index 69893c3d..00000000
--- a/client/Kyuafile
+++ /dev/null
@@ -1,4 +0,0 @@
-syntax(2)
-test_suite('isc-dhcp')
-
-include('tests/Kyuafile')
diff --git a/client/tests/Makefile.am b/client/tests/Makefile.am
index 04561375..8f1f0587 100644
--- a/client/tests/Makefile.am
+++ b/client/tests/Makefile.am
@@ -5,7 +5,8 @@ AM_CPPFLAGS += -I@BINDDIR@/include -I$(top_srcdir)
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:
@@ -37,6 +38,7 @@ duid_unittests_LDADD += $(DHCPLIBS)
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; \
@@ -46,7 +48,8 @@ check: $(ATF_TESTS)
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
diff --git a/common/Kyuafile b/common/Kyuafile
deleted file mode 100644
index 69893c3d..00000000
--- a/common/Kyuafile
+++ /dev/null
@@ -1,4 +0,0 @@
-syntax(2)
-test_suite('isc-dhcp')
-
-include('tests/Kyuafile')
diff --git a/common/tests/Makefile.am b/common/tests/Makefile.am
index 84e21591..4129e450 100644
--- a/common/tests/Makefile.am
+++ b/common/tests/Makefile.am
@@ -2,7 +2,7 @@ SUBDIRS = .
AM_CPPFLAGS = $(ATF_CFLAGS) -I$(top_srcdir)/includes
-EXTRA_DIST = Atffile
+EXTRA_DIST = Atffile Kyuafile
ATF_TESTS =
@@ -45,12 +45,13 @@ ns_name_unittest_LDADD += ../libdhcp.@A@ ../../omapip/libomapi.@A@ \
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
diff --git a/configure b/configure
index e76404a8..012f8969 100755
--- a/configure
+++ b/configure
@@ -649,6 +649,7 @@ ac_prefix_program
DISTCHECK_ATF_CONFIGURE_FLAG
HAVE_ATF_FALSE
HAVE_ATF_TRUE
+UNITTESTS
pkgcfg_found
ATF_BIN
ATF_LDFLAGS
@@ -5690,10 +5691,8 @@ fi
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
+
diff --git a/configure.ac b/configure.ac
index 62593d3f..e3a29922 100644
--- a/configure.ac
+++ b/configure.ac
@@ -304,13 +304,12 @@ elif test "$atf_path" != "no" ; then
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
diff --git a/configure.ac+lt b/configure.ac+lt
index ede7ec04..5bf6a13f 100644
--- a/configure.ac+lt
+++ b/configure.ac+lt
@@ -305,13 +305,12 @@ elif test "$atf_path" != "no" ; then
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
diff --git a/configure.ac-base b/configure.ac-base
index c6136ca9..0208a048 100644
--- a/configure.ac-base
+++ b/configure.ac-base
@@ -310,13 +310,12 @@ elif test "$atf_path" != "no" ; then
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
diff --git a/configure.ac-lt b/configure.ac-lt
index 62593d3f..e3a29922 100644
--- a/configure.ac-lt
+++ b/configure.ac-lt
@@ -304,13 +304,12 @@ elif test "$atf_path" != "no" ; then
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
diff --git a/server/Kyuafile b/server/Kyuafile
deleted file mode 100644
index 69893c3d..00000000
--- a/server/Kyuafile
+++ /dev/null
@@ -1,4 +0,0 @@
-syntax(2)
-test_suite('isc-dhcp')
-
-include('tests/Kyuafile')
diff --git a/server/tests/Makefile.am b/server/tests/Makefile.am
index 4db492bf..699a0b68 100644
--- a/server/tests/Makefile.am
+++ b/server/tests/Makefile.am
@@ -4,7 +4,7 @@ AM_CPPFLAGS = $(ATF_CFLAGS) -DUNIT_TEST -I$(top_srcdir)/includes
AM_CPPFLAGS += -I@BINDDIR@/include -I$(top_srcdir)
AM_CPPFLAGS += -DLOCALSTATEDIR='"."'
-EXTRA_DIST = Atffile
+EXTRA_DIST = Atffile Kyuafile
# for autotools debugging only
info:
@@ -54,12 +54,13 @@ leaseq_unittests_LDADD = $(DHCPLIBS) $(ATF_LDFLAGS)
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
diff --git a/tests/unittest.sh.in b/tests/unittest.sh.in
index 5b51de03..d97fe409 100755
--- a/tests/unittest.sh.in
+++ b/tests/unittest.sh.in
@@ -22,6 +22,8 @@
# 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 \
@@ -33,14 +35,14 @@ 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..."
@@ -50,9 +52,9 @@ then
# 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
@@ -61,19 +63,31 @@ then
# 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