aboutsummaryrefslogtreecommitdiff
path: root/src/util/test_client.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-06-13 15:18:35 +0000
committerChristian Grothoff <christian@grothoff.org>2012-06-13 15:18:35 +0000
commit2742cca3d2180b4f615c40609fccf10a806f05c8 (patch)
tree7a59d0d43951cec4f0edd903f02ead3dbe037a2f /src/util/test_client.c
parent832d12049add37805697104b9f8eaae420eef406 (diff)
downloadgnunet-2742cca3d2180b4f615c40609fccf10a806f05c8.tar.gz
gnunet-2742cca3d2180b4f615c40609fccf10a806f05c8.zip
-cleaning up VERBOSE and check nonsense in util tests
Diffstat (limited to 'src/util/test_client.c')
-rw-r--r--src/util/test_client.c29
1 files changed, 5 insertions, 24 deletions
diff --git a/src/util/test_client.c b/src/util/test_client.c
index 54881b2dd..7d7ec8cff 100644
--- a/src/util/test_client.c
+++ b/src/util/test_client.c
@@ -29,7 +29,6 @@
29#include "gnunet_server_lib.h" 29#include "gnunet_server_lib.h"
30#include "gnunet_time_lib.h" 30#include "gnunet_time_lib.h"
31 31
32#define VERBOSE GNUNET_NO
33 32
34#define PORT 14325 33#define PORT 14325
35 34
@@ -174,15 +173,14 @@ task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
174} 173}
175 174
176 175
177/** 176int
178 * Main method, starts scheduler with task1, 177main (int argc, char *argv[])
179 * checks that "ok" is correct at the end.
180 */
181static int
182check ()
183{ 178{
184 int ok; 179 int ok;
185 180
181 GNUNET_log_setup ("test_client",
182 "WARNING",
183 NULL);
186 cfg = GNUNET_CONFIGURATION_create (); 184 cfg = GNUNET_CONFIGURATION_create ();
187 GNUNET_CONFIGURATION_set_value_number (cfg, MYNAME, "PORT", PORT); 185 GNUNET_CONFIGURATION_set_value_number (cfg, MYNAME, "PORT", PORT);
188 GNUNET_CONFIGURATION_set_value_string (cfg, MYNAME, "HOSTNAME", "localhost"); 186 GNUNET_CONFIGURATION_set_value_string (cfg, MYNAME, "HOSTNAME", "localhost");
@@ -194,21 +192,4 @@ check ()
194 return ok; 192 return ok;
195} 193}
196 194
197int
198main (int argc, char *argv[])
199{
200 int ret = 0;
201
202 GNUNET_log_setup ("test_client",
203#if VERBOSE
204 "DEBUG",
205#else
206 "WARNING",
207#endif
208 NULL);
209 ret += check ();
210
211 return ret;
212}
213
214/* end of test_client.c */ 195/* end of test_client.c */