summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am3
-rw-r--r--Makefile.in5
-rw-r--r--client/Makefile.in1
-rw-r--r--client/tests/Makefile.am7
-rw-r--r--client/tests/Makefile.in8
-rw-r--r--common/Makefile.in1
-rw-r--r--common/tests/Makefile.am5
-rw-r--r--common/tests/Makefile.in6
-rwxr-xr-xconfigure11
-rw-r--r--configure.ac9
-rw-r--r--configure.ac+lt9
-rw-r--r--configure.ac-base9
-rw-r--r--configure.ac-lt9
-rw-r--r--dhcpctl/Makefile.in1
-rw-r--r--includes/Makefile.in1
-rw-r--r--omapip/Makefile.in1
-rw-r--r--relay/Makefile.in1
-rw-r--r--server/Makefile.in1
-rw-r--r--server/tests/Makefile.am5
-rw-r--r--server/tests/Makefile.in6
-rw-r--r--tests/Makefile.in1
-rwxr-xr-xtests/unittest.sh.in36
22 files changed, 85 insertions, 51 deletions
diff --git a/Makefile.am b/Makefile.am
index e78b328f..c5211e01 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -28,7 +28,8 @@ 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 \
+ 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..e53896c3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -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,9 @@ 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 \
+ 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.
diff --git a/client/Makefile.in b/client/Makefile.in
index 8ec43f0d..a016bbe9 100644
--- a/client/Makefile.in
+++ b/client/Makefile.in
@@ -306,6 +306,7 @@ RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+UNITTESTS = @UNITTESTS@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
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/client/tests/Makefile.in b/client/tests/Makefile.in
index f0a0525f..a7cfb89a 100644
--- a/client/tests/Makefile.in
+++ b/client/tests/Makefile.in
@@ -283,6 +283,7 @@ RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+UNITTESTS = @UNITTESTS@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
@@ -341,7 +342,8 @@ SUBDIRS = .
AM_CPPFLAGS = $(ATF_CFLAGS) -DUNIT_TEST -I$(top_srcdir)/includes \
-I@BINDDIR@/include -I$(top_srcdir) -DLOCALSTATEDIR='"."' \
-DCLIENT_PATH='"."'
-EXTRA_DIST = Atffile duid0_test.txt duid1_test.txt duid2_test.txt duid3_test.txt
+EXTRA_DIST = Atffile Kyuafile duid0_test.txt duid1_test.txt \
+ duid2_test.txt duid3_test.txt
DHCPSRC = ../clparse.c ../dhc6.c ../dhclient.c
DHCPLIBS = $(top_builddir)/common/libdhcp.@A@ \
$(top_builddir)/omapip/libomapi.@A@ \
@@ -748,6 +750,7 @@ info:
@HAVE_ATF_TRUE@check: $(ATF_TESTS)
@HAVE_ATF_TRUE@ @if test $(top_srcdir) != ${top_builddir}; then \
@HAVE_ATF_TRUE@ cp $(top_srcdir)/client/tests/Atffile Atffile; \
+@HAVE_ATF_TRUE@ cp $(top_srcdir)/client/tests/Kyuafile Kyuafile; \
@HAVE_ATF_TRUE@ cp $(top_srcdir)/client/tests/duid0_test.txt duid0_test.txt; \
@HAVE_ATF_TRUE@ cp $(top_srcdir)/client/tests/duid1_test.txt duid1_test.txt; \
@HAVE_ATF_TRUE@ cp $(top_srcdir)/client/tests/duid2_test.txt duid2_test.txt; \
@@ -757,7 +760,8 @@ info:
@HAVE_ATF_TRUE@distclean-local:
@HAVE_ATF_TRUE@ @if test $(top_srcdir) != ${top_builddir}; then \
-@HAVE_ATF_TRUE@ rm -f Atffile duid0_test.txt duid1_test.txt; \
+@HAVE_ATF_TRUE@ rm -f Atffile Kyuafile; \
+@HAVE_ATF_TRUE@ rm -f duid0_test.txt duid1_test.txt; \
@HAVE_ATF_TRUE@ rm -f duid2_test.txt duid3_test.txt; \
@HAVE_ATF_TRUE@ fi
diff --git a/common/Makefile.in b/common/Makefile.in
index b8eafe77..630de997 100644
--- a/common/Makefile.in
+++ b/common/Makefile.in
@@ -315,6 +315,7 @@ RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+UNITTESTS = @UNITTESTS@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
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/common/tests/Makefile.in b/common/tests/Makefile.in
index 3818764d..60b176f0 100644
--- a/common/tests/Makefile.in
+++ b/common/tests/Makefile.in
@@ -306,6 +306,7 @@ RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+UNITTESTS = @UNITTESTS@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
@@ -362,7 +363,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = .
AM_CPPFLAGS = $(ATF_CFLAGS) -I$(top_srcdir)/includes
-EXTRA_DIST = Atffile
+EXTRA_DIST = Atffile Kyuafile
ATF_TESTS = $(am__append_1)
@HAVE_ATF_TRUE@alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
@HAVE_ATF_TRUE@alloc_unittest_LDADD = $(ATF_LDFLAGS) ../libdhcp.@A@ \
@@ -767,12 +768,13 @@ uninstall-am:
@HAVE_ATF_TRUE@check: $(ATF_TESTS)
@HAVE_ATF_TRUE@ @if test $(top_srcdir) != ${top_builddir}; then \
@HAVE_ATF_TRUE@ cp $(top_srcdir)/common/tests/Atffile Atffile; \
+@HAVE_ATF_TRUE@ cp $(top_srcdir)/common/tests/Kyuafile Kyuafile; \
@HAVE_ATF_TRUE@ fi
@HAVE_ATF_TRUE@ sh ${top_builddir}/tests/unittest.sh
@HAVE_ATF_TRUE@distclean-local:
@HAVE_ATF_TRUE@ @if test $(top_srcdir) != ${top_builddir}; then \
-@HAVE_ATF_TRUE@ rm -f Atffile; \
+@HAVE_ATF_TRUE@ rm -f Atffile Kyuafile; \
@HAVE_ATF_TRUE@ fi
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/configure b/configure
index a93fb7ca..e9b86494 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
@@ -5501,8 +5502,8 @@ if test "$enable_relay_port" = "yes"; then
$as_echo "#define RELAY_PORT 1" >>confdefs.h
else
- # so we can report below
- enable_relay_port="no"
+ # so we can report below
+ enable_relay_port="no"
fi
# PARANOIA is off by default (until we can test it with all features)
@@ -5693,10 +5694,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 bb7b54bf..203cf57c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -185,8 +185,8 @@ if test "$enable_relay_port" = "yes"; then
AC_DEFINE([RELAY_PORT], [1],
[Define to 1 to include relay port support.])
else
- # so we can report below
- enable_relay_port="no"
+ # so we can report below
+ enable_relay_port="no"
fi
# PARANOIA is off by default (until we can test it with all features)
@@ -307,13 +307,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 340e59bf..26b2383c 100644
--- a/configure.ac+lt
+++ b/configure.ac+lt
@@ -186,8 +186,8 @@ if test "$enable_relay_port" = "yes"; then
AC_DEFINE([RELAY_PORT], [1],
[Define to 1 to include relay port support.])
else
- # so we can report below
- enable_relay_port="no"
+ # so we can report below
+ enable_relay_port="no"
fi
# PARANOIA is off by default (until we can test it with all features)
@@ -308,13 +308,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 a64224f8..7a512f84 100644
--- a/configure.ac-base
+++ b/configure.ac-base
@@ -191,8 +191,8 @@ if test "$enable_relay_port" = "yes"; then
AC_DEFINE([RELAY_PORT], [1],
[Define to 1 to include relay port support.])
else
- # so we can report below
- enable_relay_port="no"
+ # so we can report below
+ enable_relay_port="no"
fi
# PARANOIA is off by default (until we can test it with all features)
@@ -313,13 +313,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 bb7b54bf..203cf57c 100644
--- a/configure.ac-lt
+++ b/configure.ac-lt
@@ -185,8 +185,8 @@ if test "$enable_relay_port" = "yes"; then
AC_DEFINE([RELAY_PORT], [1],
[Define to 1 to include relay port support.])
else
- # so we can report below
- enable_relay_port="no"
+ # so we can report below
+ enable_relay_port="no"
fi
# PARANOIA is off by default (until we can test it with all features)
@@ -307,13 +307,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/dhcpctl/Makefile.in b/dhcpctl/Makefile.in
index a4781a10..201df62c 100644
--- a/dhcpctl/Makefile.in
+++ b/dhcpctl/Makefile.in
@@ -284,6 +284,7 @@ RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+UNITTESTS = @UNITTESTS@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
diff --git a/includes/Makefile.in b/includes/Makefile.in
index d9ac8dc9..3bfe6a80 100644
--- a/includes/Makefile.in
+++ b/includes/Makefile.in
@@ -237,6 +237,7 @@ RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+UNITTESTS = @UNITTESTS@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
diff --git a/omapip/Makefile.in b/omapip/Makefile.in
index 3c80afe2..619434f5 100644
--- a/omapip/Makefile.in
+++ b/omapip/Makefile.in
@@ -279,6 +279,7 @@ RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+UNITTESTS = @UNITTESTS@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
diff --git a/relay/Makefile.in b/relay/Makefile.in
index 09dbe85b..9e9e7bd2 100644
--- a/relay/Makefile.in
+++ b/relay/Makefile.in
@@ -258,6 +258,7 @@ RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+UNITTESTS = @UNITTESTS@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
diff --git a/server/Makefile.in b/server/Makefile.in
index d585d08d..08e2774a 100644
--- a/server/Makefile.in
+++ b/server/Makefile.in
@@ -324,6 +324,7 @@ RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+UNITTESTS = @UNITTESTS@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
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/server/tests/Makefile.in b/server/tests/Makefile.in
index 4fdfed14..bc1c00b3 100644
--- a/server/tests/Makefile.in
+++ b/server/tests/Makefile.in
@@ -340,6 +340,7 @@ RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+UNITTESTS = @UNITTESTS@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
@@ -397,7 +398,7 @@ top_srcdir = @top_srcdir@
SUBDIRS = .
AM_CPPFLAGS = $(ATF_CFLAGS) -DUNIT_TEST -I$(top_srcdir)/includes \
-I@BINDDIR@/include -I$(top_srcdir) -DLOCALSTATEDIR='"."'
-EXTRA_DIST = Atffile
+EXTRA_DIST = Atffile Kyuafile
DHCPSRC = ../dhcp.c ../bootp.c ../confpars.c ../db.c ../class.c \
../failover.c ../omapi.c ../mdb.c ../stables.c ../salloc.c \
../ddns.c ../dhcpleasequery.c ../dhcpv6.c ../mdb6.c \
@@ -1064,12 +1065,13 @@ info:
@HAVE_ATF_TRUE@check: $(ATF_TESTS)
@HAVE_ATF_TRUE@ @if test $(top_srcdir) != ${top_builddir}; then \
@HAVE_ATF_TRUE@ cp $(top_srcdir)/server/tests/Atffile Atffile; \
+@HAVE_ATF_TRUE@ cp $(top_srcdir)/server/tests/Kyuafile Kyuafile; \
@HAVE_ATF_TRUE@ fi
@HAVE_ATF_TRUE@ sh ${top_builddir}/tests/unittest.sh
@HAVE_ATF_TRUE@distclean-local:
@HAVE_ATF_TRUE@ @if test $(top_srcdir) != ${top_builddir}; then \
-@HAVE_ATF_TRUE@ rm -f Atffile; \
+@HAVE_ATF_TRUE@ rm -f Atffile Kyuafile; \
@HAVE_ATF_TRUE@ fi
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/tests/Makefile.in b/tests/Makefile.in
index bd505391..44464af6 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -231,6 +231,7 @@ RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+UNITTESTS = @UNITTESTS@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
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