[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 02/03: ATS test: Give return value a meaning
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 02/03: ATS test: Give return value a meaning |
Date: |
Fri, 25 Jan 2019 01:39:59 +0100 |
This is an automated email from the git hooks/post-receive script.
julius-buenger pushed a commit to branch master
in repository gnunet.
commit b7578171dd1d81b4ff54c42d0f72661e373a4597
Author: Julius Bünger <address@hidden>
AuthorDate: Thu Jan 24 13:29:10 2019 +0100
ATS test: Give return value a meaning
---
src/ats/test_ats2_lib.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
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;
}
--
To stop receiving notification emails like this one, please contact
address@hidden