merge aggregator
This commit is contained in:
parent
6050dad63e
commit
7ebacc6fbd
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
This file is part of TALER
|
This file is part of TALER
|
||||||
Copyright (C) 2016 GNUnet e.V.
|
Copyright (C) 2016, 2017 GNUnet e.V.
|
||||||
|
|
||||||
TALER is free software; you can redistribute it and/or modify it under the
|
TALER is free software; you can redistribute it and/or modify it under the
|
||||||
terms of the GNU General Public License as published by the Free Software
|
terms of the GNU General Public License as published by the Free Software
|
||||||
@ -71,6 +71,15 @@ main (int argc,
|
|||||||
unsigned int cnt;
|
unsigned int cnt;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
|
if (GNUNET_OK !=
|
||||||
|
GNUNET_NETWORK_test_port_free (IPPROTO_TCP,
|
||||||
|
8081))
|
||||||
|
{
|
||||||
|
fprintf (stderr,
|
||||||
|
"Required port %u not available, skipping.\n",
|
||||||
|
8081);
|
||||||
|
return 77;
|
||||||
|
}
|
||||||
GNUNET_log_setup ("test-bank-api",
|
GNUNET_log_setup ("test-bank-api",
|
||||||
"WARNING",
|
"WARNING",
|
||||||
NULL);
|
NULL);
|
||||||
@ -83,6 +92,12 @@ main (int argc,
|
|||||||
"serve-http",
|
"serve-http",
|
||||||
"--port", "8081",
|
"--port", "8081",
|
||||||
NULL);
|
NULL);
|
||||||
|
if (NULL == bankd_admin)
|
||||||
|
{
|
||||||
|
fprintf (stderr,
|
||||||
|
"Failed to launch `taler-bank-manage' for admin, skipping test\n");
|
||||||
|
return 77; /* report 'skip' */
|
||||||
|
}
|
||||||
bankd = GNUNET_OS_start_process (GNUNET_NO,
|
bankd = GNUNET_OS_start_process (GNUNET_NO,
|
||||||
GNUNET_OS_INHERIT_STD_ALL,
|
GNUNET_OS_INHERIT_STD_ALL,
|
||||||
NULL, NULL, NULL,
|
NULL, NULL, NULL,
|
||||||
@ -92,12 +107,14 @@ main (int argc,
|
|||||||
"--port", "8080",
|
"--port", "8080",
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
if (NULL == bankd)
|
||||||
if ((NULL == bankd_admin) || (NULL == bankd))
|
|
||||||
{
|
{
|
||||||
/*FIXME: More accurate error message?*/
|
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
"taler-bank-manage not found, skipping test\n");
|
"Failed to launch taler-bank-manage, skipping test\n");
|
||||||
|
GNUNET_OS_process_kill (bankd_admin,
|
||||||
|
SIGTERM);
|
||||||
|
GNUNET_OS_process_wait (bankd_admin);
|
||||||
|
GNUNET_OS_process_destroy (bankd_admin);
|
||||||
return 77; /* report 'skip' */
|
return 77; /* report 'skip' */
|
||||||
}
|
}
|
||||||
/* give child time to start and bind against the socket */
|
/* give child time to start and bind against the socket */
|
||||||
@ -134,6 +151,8 @@ main (int argc,
|
|||||||
SIGTERM);
|
SIGTERM);
|
||||||
GNUNET_OS_process_wait (bankd);
|
GNUNET_OS_process_wait (bankd);
|
||||||
GNUNET_OS_process_destroy (bankd);
|
GNUNET_OS_process_destroy (bankd);
|
||||||
|
GNUNET_OS_process_wait (bankd_admin);
|
||||||
|
GNUNET_OS_process_destroy (bankd_admin);
|
||||||
if (cnt > 30)
|
if (cnt > 30)
|
||||||
{
|
{
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
|
@ -3187,6 +3187,24 @@ main (int argc,
|
|||||||
GNUNET_log_setup ("test-exchange-api",
|
GNUNET_log_setup ("test-exchange-api",
|
||||||
"INFO",
|
"INFO",
|
||||||
NULL);
|
NULL);
|
||||||
|
if (GNUNET_OK !=
|
||||||
|
GNUNET_NETWORK_test_port_free (IPPROTO_TCP,
|
||||||
|
8081))
|
||||||
|
{
|
||||||
|
fprintf (stderr,
|
||||||
|
"Required port %u not available, skipping.\n",
|
||||||
|
8081);
|
||||||
|
return 77;
|
||||||
|
}
|
||||||
|
if (GNUNET_OK !=
|
||||||
|
GNUNET_NETWORK_test_port_free (IPPROTO_TCP,
|
||||||
|
8082))
|
||||||
|
{
|
||||||
|
fprintf (stderr,
|
||||||
|
"Required port %u not available, skipping.\n",
|
||||||
|
8082);
|
||||||
|
return 77;
|
||||||
|
}
|
||||||
proc = GNUNET_OS_start_process (GNUNET_NO,
|
proc = GNUNET_OS_start_process (GNUNET_NO,
|
||||||
GNUNET_OS_INHERIT_STD_ALL,
|
GNUNET_OS_INHERIT_STD_ALL,
|
||||||
NULL, NULL, NULL,
|
NULL, NULL, NULL,
|
||||||
|
@ -1241,6 +1241,15 @@ main (int argc,
|
|||||||
}
|
}
|
||||||
GNUNET_OS_process_wait (proc);
|
GNUNET_OS_process_wait (proc);
|
||||||
GNUNET_OS_process_destroy (proc);
|
GNUNET_OS_process_destroy (proc);
|
||||||
|
if (GNUNET_OK !=
|
||||||
|
GNUNET_NETWORK_test_port_free (IPPROTO_TCP,
|
||||||
|
8082))
|
||||||
|
{
|
||||||
|
fprintf (stderr,
|
||||||
|
"Required port %u not available, skipping.\n",
|
||||||
|
8082);
|
||||||
|
return 77;
|
||||||
|
}
|
||||||
cfg = GNUNET_CONFIGURATION_create ();
|
cfg = GNUNET_CONFIGURATION_create ();
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
GNUNET_CONFIGURATION_parse (cfg,
|
GNUNET_CONFIGURATION_parse (cfg,
|
||||||
|
Loading…
Reference in New Issue
Block a user