Commit 6b87c7f2 authored by Francis Dupont's avatar Francis Dupont

checkpoint for regen

parent e3318080
syntax(2)
test_suite('isc-dhcp')
include('client/Kyuafile')
include('common/Kyuafile')
include('server/Kyuafile')
......@@ -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
......
# 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
......
syntax(2)
test_suite('isc-dhcp')
include('tests/Kyuafile')
......@@ -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
......
syntax(2)
test_suite('isc-dhcp')
include('tests/Kyuafile')
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
syntax(2)
test_suite('isc-dhcp')
include('tests/Kyuafile')
......@@ -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
......
......@@ -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
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