aboutsummaryrefslogtreecommitdiff
path: root/src/datastore/test_datastore_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-08-03 16:19:03 +0000
committerChristian Grothoff <christian@grothoff.org>2010-08-03 16:19:03 +0000
commit6c1c263b8fb00534edc106b131d0b1ddeef1d07a (patch)
treeeb575a72b0e70afce396d359fd21448752353382 /src/datastore/test_datastore_api.c
parent596b6f94df8bdb8d22268552d52e2c64759d6007 (diff)
downloadgnunet-6c1c263b8fb00534edc106b131d0b1ddeef1d07a.tar.gz
gnunet-6c1c263b8fb00534edc106b131d0b1ddeef1d07a.zip
fixes
Diffstat (limited to 'src/datastore/test_datastore_api.c')
-rw-r--r--src/datastore/test_datastore_api.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/datastore/test_datastore_api.c b/src/datastore/test_datastore_api.c
index ec83e9196..1a753d2bf 100644
--- a/src/datastore/test_datastore_api.c
+++ b/src/datastore/test_datastore_api.c
@@ -33,6 +33,8 @@
33 33
34#define VERBOSE GNUNET_NO 34#define VERBOSE GNUNET_NO
35 35
36#define START_DATASTORE GNUNET_NO
37
36/** 38/**
37 * How long until we give up on transmitting the message? 39 * How long until we give up on transmitting the message?
38 */ 40 */
@@ -598,7 +600,9 @@ static int
598check () 600check ()
599{ 601{
600 char cfg_name[128]; 602 char cfg_name[128];
603#if START_DATASTORE
601 pid_t pid; 604 pid_t pid;
605#endif
602 char *const argv[] = { 606 char *const argv[] = {
603 "test-datastore-api", 607 "test-datastore-api",
604 "-c", 608 "-c",
@@ -615,21 +619,25 @@ check ()
615 sizeof (cfg_name), 619 sizeof (cfg_name),
616 "test_datastore_api_data_%s.conf", 620 "test_datastore_api_data_%s.conf",
617 plugin_name); 621 plugin_name);
622#if START_DATASTORE
618 pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", 623 pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm",
619 "gnunet-service-arm", 624 "gnunet-service-arm",
620#if VERBOSE 625#if VERBOSE
621 "-L", "DEBUG", 626 "-L", "DEBUG",
622#endif 627#endif
623 "-c", cfg_name, NULL); 628 "-c", cfg_name, NULL);
629#endif
624 GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, 630 GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1,
625 argv, "test-datastore-api", "nohelp", 631 argv, "test-datastore-api", "nohelp",
626 options, &run, NULL); 632 options, &run, NULL);
633#if START_DATASTORE
627 if (0 != PLIBC_KILL (pid, SIGTERM)) 634 if (0 != PLIBC_KILL (pid, SIGTERM))
628 { 635 {
629 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); 636 GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
630 ok = 1; 637 ok = 1;
631 } 638 }
632 GNUNET_OS_process_wait(pid); 639 GNUNET_OS_process_wait(pid);
640#endif
633 if (ok != 0) 641 if (ok != 0)
634 fprintf (stderr, "Missed some testcases: %u\n", ok); 642 fprintf (stderr, "Missed some testcases: %u\n", ok);
635 return ok; 643 return ok;