- ic = GNUNET_PEERINFO_iterate (h, NULL,
- GNUNET_TIME_relative_multiply
- (GNUNET_TIME_UNIT_SECONDS, 15), &process, cls);
-}
-
-
-static int
-check ()
-{
- int ok = 3;
- struct GNUNET_OS_Process *proc;
-
- char *const argv[] = { "test-peerinfo-api",
- "-c",
- "test_peerinfo_api_data.conf",
-#if DEBUG_PEERINFO
- "-L", "DEBUG",
-#endif
- NULL
- };
- struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_END
- };
- proc =
- GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-service-peerinfo",
- "gnunet-service-peerinfo",
-#if DEBUG_PEERINFO
- "-L", "DEBUG",
-#endif
- "-c", "test_peerinfo_api_data.conf", NULL);
- GNUNET_assert (NULL != proc);
- GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv,
- "test-peerinfo-api", "nohelp", options, &run, &ok);
- if (0 != GNUNET_OS_process_kill (proc, SIGTERM))
- {
- GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
- ok = 1;
- }
- GNUNET_OS_process_wait (proc);
- GNUNET_OS_process_close (proc);
- proc = NULL;
- return ok;