aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/test_namestore_api_zone_iteration_stop.c
diff options
context:
space:
mode:
authorLRN <lrn1986@gmail.com>2013-12-09 17:53:31 +0000
committerLRN <lrn1986@gmail.com>2013-12-09 17:53:31 +0000
commitcc57e1d42bbfee97247ad7ea1db3fa81ecbf2c08 (patch)
treea1239bef1cb83eed339459d24dad5e69f27c8aa1 /src/namestore/test_namestore_api_zone_iteration_stop.c
parent2d828dcdcd023b9361b11491254d08f122c142b1 (diff)
downloadgnunet-cc57e1d42bbfee97247ad7ea1db3fa81ecbf2c08.tar.gz
gnunet-cc57e1d42bbfee97247ad7ea1db3fa81ecbf2c08.zip
Remove test home at the beginning and at the VERY end
Diffstat (limited to 'src/namestore/test_namestore_api_zone_iteration_stop.c')
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_stop.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c b/src/namestore/test_namestore_api_zone_iteration_stop.c
index 77a3d6a38..adfd234c6 100644
--- a/src/namestore/test_namestore_api_zone_iteration_stop.c
+++ b/src/namestore/test_namestore_api_zone_iteration_stop.c
@@ -105,12 +105,6 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
105 if (privkey2 != NULL) 105 if (privkey2 != NULL)
106 GNUNET_free (privkey2); 106 GNUNET_free (privkey2);
107 privkey2 = NULL; 107 privkey2 = NULL;
108
109 if (NULL != directory)
110 {
111 GNUNET_DISK_directory_remove (directory);
112 GNUNET_free (directory);
113 }
114 res = 1; 108 res = 1;
115} 109}
116 110
@@ -441,6 +435,7 @@ run (void *cls,
441{ 435{
442 directory = NULL; 436 directory = NULL;
443 GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); 437 GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory);
438 GNUNET_DISK_directory_remove (directory);
444 439
445 endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); 440 endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL);
446 nsh = GNUNET_NAMESTORE_connect (cfg); 441 nsh = GNUNET_NAMESTORE_connect (cfg);
@@ -461,14 +456,20 @@ run (void *cls,
461int 456int
462main (int argc, char *argv[]) 457main (int argc, char *argv[])
463{ 458{
464 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore/");
465 res = 1; 459 res = 1;
466 if (0 != 460 if (0 !=
467 GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration-stop", 461 GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration-stop",
468 "test_namestore_api.conf", 462 "test_namestore_api.conf",
469 &run, 463 &run,
470 NULL)) 464 NULL))
471 return 1; 465 {
466 res = 1;
467 }
468 if (NULL != directory)
469 {
470 GNUNET_DISK_directory_remove (directory);
471 GNUNET_free (directory);
472 }
472 return res; 473 return res;
473} 474}
474 475