From b7578171dd1d81b4ff54c42d0f72661e373a4597 Mon Sep 17 00:00:00 2001 From: Julius Bünger Date: Thu, 24 Jan 2019 13:29:10 +0100 Subject: ATS test: Give return value a meaning --- src/ats/test_ats2_lib.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ats/test_ats2_lib.c b/src/ats/test_ats2_lib.c index 4a461826d..b23493239 100644 --- a/src/ats/test_ats2_lib.c +++ b/src/ats/test_ats2_lib.c @@ -26,6 +26,12 @@ #include "gnunet_ats_transport_service.h" #include "gnunet_testing_lib.h" +/** + * @brief Indicates the success of the whole test + */ +static int ret; + + /** * @brief ATS Application Handle * @@ -89,6 +95,7 @@ suggestion_cb (void *cls, const char *address) { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "suggestion_cb() called\n"); + ret = 0; } @@ -210,10 +217,16 @@ int main (int argc, char *argv[]) { + ret = 1; memset (&other_peer, 0, sizeof (struct GNUNET_PeerIdentity)); - return GNUNET_TESTING_peer_run ("test-ats2-lib", - "test_ats2_lib.conf", - &run, NULL); + if (0 != GNUNET_TESTING_peer_run ("test-ats2-lib", + "test_ats2_lib.conf", + &run, NULL)) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Running the testing peer failed.\n"); + return 1; + } + return ret; } -- cgit v1.2.3