summaryrefslogtreecommitdiff
path: root/lib/tests
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2013-05-08 20:28:17 +0200
committerLinus Nordberg <linus@nordberg.se>2013-05-08 20:28:17 +0200
commit6d4cfa75426dfdc28dcc97c9c3d532a417ad1194 (patch)
treea2584b909f209d20bc0f47746e61acc3c78c0f4d /lib/tests
parent591a8ea24d0e2426ff34a3ccc549fee8cc70c323 (diff)
Exit tests with number of failures.
Now 'make check' really fails when a test fails.
Diffstat (limited to 'lib/tests')
-rw-r--r--lib/tests/test-udp.c6
1 files changed, 4 insertions, 2 deletions
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;
}