diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-11-07 14:39:15 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-11-07 14:39:15 +0100 |
commit | 1d740824fa8914e21c402abefc5f3d5a8cdfa4ca (patch) | |
tree | 74223d7b8931806183f5b5d8b09222c00d8a62c7 /src/bank-lib/test_bank_api.c | |
parent | 6d6a9dac39bd6c24a7d527186aaa2a1eec2d8c36 (diff) | |
parent | 247b8e33b3ea20407910929c78232ff0d44e8d9a (diff) |
resolving merge issue
Diffstat (limited to 'src/bank-lib/test_bank_api.c')
-rw-r--r-- | src/bank-lib/test_bank_api.c | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/src/bank-lib/test_bank_api.c b/src/bank-lib/test_bank_api.c index 88fe82451..88ca2fd24 100644 --- a/src/bank-lib/test_bank_api.c +++ b/src/bank-lib/test_bank_api.c @@ -67,22 +67,35 @@ main (int argc, char * const *argv) { struct GNUNET_OS_Process *bankd; + struct GNUNET_OS_Process *bankd_admin; unsigned int cnt; int result; GNUNET_log_setup ("test-bank-api", "WARNING", NULL); + bankd_admin = GNUNET_OS_start_process (GNUNET_NO, + GNUNET_OS_INHERIT_STD_ALL, + NULL, NULL, NULL, + "taler-bank-manage", + "taler-bank-manage", + "--admin", + "serve-http", + "--port", "8081", + NULL); bankd = GNUNET_OS_start_process (GNUNET_NO, GNUNET_OS_INHERIT_STD_ALL, NULL, NULL, NULL, "taler-bank-manage", "taler-bank-manage", "serve-http", - "--port", "8081", + "--port", "8080", NULL); - if (NULL == bankd) + + + if ((NULL == bankd_admin) || (NULL == bankd)) { + /*FIXME: More accurate error message?*/ fprintf (stderr, "taler-bank-manage not found, skipping test\n"); return 77; /* report 'skip' */ @@ -99,13 +112,26 @@ main (int argc, if (cnt > 30) break; } - while (0 != system ("wget -q -t 1 -T 1 http://127.0.0.1:8081/ -o /dev/null -O /dev/null")); + while (0 != system ("wget -q -t 1 -T 1 http://127.0.0.1:8080/ -o /dev/null -O /dev/null")); + + do + { + fprintf (stderr, "."); + sleep (1); + cnt++; + if (cnt > 30) + break; + } + while (0 != system ("wget -q -t 1 -T 1 http://127.0.0.1:8081/admin/add/incoming -o /dev/null -O /dev/null")); + fprintf (stderr, "\n"); result = GNUNET_SYSERR; if (cnt <= 30) GNUNET_SCHEDULER_run (&run, &result); GNUNET_OS_process_kill (bankd, SIGTERM); + GNUNET_OS_process_kill (bankd_admin, + SIGTERM); GNUNET_OS_process_wait (bankd); GNUNET_OS_process_destroy (bankd); if (cnt > 30) |