#define VERBOSE GNUNET_NO
+#define START_DATASTORE GNUNET_YES
+
/**
* How long until we give up on transmitting the message?
*/
{
if (crc->phase != RP_GET_MULTIPLE_DONE)
{
+ fprintf (stderr,
+ "Wrong phase: %d\n",
+ crc->phase);
GNUNET_break (0);
crc->phase = RP_ERROR;
}
if (key == NULL)
{
- GNUNET_assert (crc->phase == RP_UPDATE_DONE);
- crc->phase = RP_DONE;
+ if (crc->phase != RP_UPDATE_DONE)
+ {
+ GNUNET_break (0);
+ crc->phase = RP_ERROR;
+ }
+ else
+ {
+ crc->phase = RP_DONE;
+ }
GNUNET_SCHEDULER_add_continuation (crc->sched,
&run_continuation,
crc,
check ()
{
char cfg_name[128];
+#if START_DATASTORE
pid_t pid;
- char *const argv[] = { "test-datastore-api",
+#endif
+ char *const argv[] = {
+ "test-datastore-api",
"-c",
- "test_datastore_api_data.conf",
+ cfg_name,
#if VERBOSE
"-L", "DEBUG",
#endif
sizeof (cfg_name),
"test_datastore_api_data_%s.conf",
plugin_name);
+#if START_DATASTORE
pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm",
"gnunet-service-arm",
#if VERBOSE
"-L", "DEBUG",
#endif
"-c", cfg_name, NULL);
+#endif
GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1,
argv, "test-datastore-api", "nohelp",
options, &run, NULL);
+#if START_DATASTORE
if (0 != PLIBC_KILL (pid, SIGTERM))
{
GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
ok = 1;
}
GNUNET_OS_process_wait(pid);
+#endif
if (ok != 0)
fprintf (stderr, "Missed some testcases: %u\n", ok);
return ok;