summaryrefslogtreecommitdiff
path: root/lib/tests
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tests')
-rw-r--r--lib/tests/Makefile.am6
-rw-r--r--lib/tests/test-udp.c6
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/tests/Makefile.am b/lib/tests/Makefile.am
index 045991a..dc15264 100644
--- a/lib/tests/Makefile.am
+++ b/lib/tests/Makefile.am
@@ -1,12 +1,12 @@
AUTOMAKE_OPTIONS = foreign
-INCLUDES = -I$(top_srcdir)/include
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)
AM_CFLAGS = -Wall -Werror -g
TESTS = test-udp
check_PROGRAMS = test-udp udp-server
-test_udp_SOURCES = test-udp.c udp.c
+test_udp_SOURCES = test-udp.c udp.c udp.h
test_udp_LDADD = ../libradsec.la -lcunit -lm
-udp_server_SOURCES = udp-server.c udp.c
+udp_server_SOURCES = udp-server.c udp.c udp.h
diff --git a/lib/tests/test-udp.c b/lib/tests/test-udp.c
index 7ad340a..ed176c0 100644
--- a/lib/tests/test-udp.c
+++ b/lib/tests/test-udp.c
@@ -137,6 +137,7 @@ main (int argc, char *argv[])
{
CU_pSuite s = NULL;
CU_pTest t = NULL;
+ unsigned int nfail;
assert (CU_initialize_registry () == CUE_SUCCESS);
s = CU_add_suite ("auth", NULL, NULL); assert (s);
@@ -144,8 +145,9 @@ main (int argc, char *argv[])
s = CU_add_suite ("buffering", NULL, NULL); assert (s);
t = CU_ADD_TEST (s, test_buffering); assert (t);
- return !(CU_basic_run_tests () == CUE_SUCCESS);
+ assert (CU_basic_run_tests () == CUE_SUCCESS);
+ nfail = CU_get_number_of_failures();
CU_cleanup_registry ();
- return 0;
+ return nfail;
}