diff options
author | Julius Bünger <buenger@mytum.de> | 2019-01-24 13:29:10 +0100 |
---|---|---|
committer | Julius Bünger <buenger@mytum.de> | 2019-01-25 01:39:11 +0100 |
commit | b7578171dd1d81b4ff54c42d0f72661e373a4597 (patch) | |
tree | 52ae2dbdbc2ca248516eb1e646b1bb1e50e69afe /src/ats | |
parent | 44a86cf53ff5c7231640bcf332511fd7b301b41a (diff) | |
download | gnunet-b7578171dd1d81b4ff54c42d0f72661e373a4597.tar.gz gnunet-b7578171dd1d81b4ff54c42d0f72661e373a4597.zip |
ATS test: Give return value a meaning
Diffstat (limited to 'src/ats')
-rw-r--r-- | src/ats/test_ats2_lib.c | 19 |
1 files 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 | |||
@@ -27,6 +27,12 @@ | |||
27 | #include "gnunet_testing_lib.h" | 27 | #include "gnunet_testing_lib.h" |
28 | 28 | ||
29 | /** | 29 | /** |
30 | * @brief Indicates the success of the whole test | ||
31 | */ | ||
32 | static int ret; | ||
33 | |||
34 | |||
35 | /** | ||
30 | * @brief ATS Application Handle | 36 | * @brief ATS Application Handle |
31 | * | 37 | * |
32 | * Handle to the application-side of ATS. | 38 | * Handle to the application-side of ATS. |
@@ -89,6 +95,7 @@ suggestion_cb (void *cls, | |||
89 | const char *address) | 95 | const char *address) |
90 | { | 96 | { |
91 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "suggestion_cb() called\n"); | 97 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "suggestion_cb() called\n"); |
98 | ret = 0; | ||
92 | } | 99 | } |
93 | 100 | ||
94 | 101 | ||
@@ -210,10 +217,16 @@ int | |||
210 | main (int argc, | 217 | main (int argc, |
211 | char *argv[]) | 218 | char *argv[]) |
212 | { | 219 | { |
220 | ret = 1; | ||
213 | memset (&other_peer, 0, sizeof (struct GNUNET_PeerIdentity)); | 221 | memset (&other_peer, 0, sizeof (struct GNUNET_PeerIdentity)); |
214 | return GNUNET_TESTING_peer_run ("test-ats2-lib", | 222 | if (0 != GNUNET_TESTING_peer_run ("test-ats2-lib", |
215 | "test_ats2_lib.conf", | 223 | "test_ats2_lib.conf", |
216 | &run, NULL); | 224 | &run, NULL)) |
225 | { | ||
226 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Running the testing peer failed.\n"); | ||
227 | return 1; | ||
228 | } | ||
229 | return ret; | ||
217 | } | 230 | } |
218 | 231 | ||
219 | 232 | ||