]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
checkpoint for regen
authorFrancis Dupont <fdupont@isc.org>
Sat, 30 Dec 2017 16:49:14 +0000 (17:49 +0100)
committerFrancis Dupont <fdupont@isc.org>
Sat, 30 Dec 2017 16:49:14 +0000 (17:49 +0100)
15 files changed:
Kyuafile [deleted file]
Makefile.am
Makefile.in
client/Kyuafile [deleted file]
client/tests/Makefile.am
common/Kyuafile [deleted file]
common/tests/Makefile.am
configure
configure.ac
configure.ac+lt
configure.ac-base
configure.ac-lt
server/Kyuafile [deleted file]
server/tests/Makefile.am
tests/unittest.sh.in

diff --git a/Kyuafile b/Kyuafile
deleted file mode 100644 (file)
index 3093c38..0000000
--- a/Kyuafile
+++ /dev/null
@@ -1,6 +0,0 @@
-syntax(2)
-test_suite('isc-dhcp')
-
-include('client/Kyuafile')
-include('common/Kyuafile')
-include('server/Kyuafile')
index e78b328fe0c1dbdd087d2d3719a9baea4cf4fd67..66d4b16092c5796d5e4b7d7e2129cf1b95aadc8c 100644 (file)
@@ -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
index db6b01931d1cf2a9340a0e0792b55fb377b6d930..2d986d6f3348eb6bde6e3de41b4fed65a28f9d46 100644 (file)
@@ -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 (file)
index 69893c3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-syntax(2)
-test_suite('isc-dhcp')
-
-include('tests/Kyuafile')
index 04561375103b54f6fb8d3092caedaf4903670797..8f1f05876dee868748c3937cc67f34806d3f8d01 100644 (file)
@@ -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 (file)
index 69893c3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-syntax(2)
-test_suite('isc-dhcp')
-
-include('tests/Kyuafile')
index 84e215912b92af267fb61e1c9f4b34155cd5efef..4129e4506f6f85bcc93d3e12f6077258032c0082 100644 (file)
@@ -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
index e76404a804e861748910cb511d56c97464409589..012f896951df6a07e56685236f65e7f830162a0f 100755 (executable)
--- 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
+
 
 
 
index 62593d3f4855446a29aced8158095be27c453220..e3a29922a89b4e62cd38d853c927a685d81e08c8 100644 (file)
@@ -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
 
index ede7ec046cd69998cf4cedbdf931a8b8f9505b50..5bf6a13f37552ab589a11537c9db9b38fc24993b 100644 (file)
@@ -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
 
index c6136ca924aee2e57c319bc55b42396a03c3d078..0208a0487b6b832622104750b19f5eed1ce39fe3 100644 (file)
@@ -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
 
index 62593d3f4855446a29aced8158095be27c453220..e3a29922a89b4e62cd38d853c927a685d81e08c8 100644 (file)
@@ -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 (file)
index 69893c3..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-syntax(2)
-test_suite('isc-dhcp')
-
-include('tests/Kyuafile')
index 4db492bfe468b30d31a8934b5bdb48631a98c847..699a0b680a7bc552ee98a931b23583c052c47dac 100644 (file)
@@ -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
index 5b51de039f3a71258d8f941b49e967492995e105..d97fe409c18640cbeeb9850e8cb835a350f1bbd5 100755 (executable)
@@ -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