diff options
author | LRN <lrn1986@gmail.com> | 2013-12-09 17:53:31 +0000 |
---|---|---|
committer | LRN <lrn1986@gmail.com> | 2013-12-09 17:53:31 +0000 |
commit | cc57e1d42bbfee97247ad7ea1db3fa81ecbf2c08 (patch) | |
tree | a1239bef1cb83eed339459d24dad5e69f27c8aa1 /src/namestore/test_namestore_api_zone_iteration_nick.c | |
parent | 2d828dcdcd023b9361b11491254d08f122c142b1 (diff) | |
download | gnunet-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_nick.c')
-rw-r--r-- | src/namestore/test_namestore_api_zone_iteration_nick.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/namestore/test_namestore_api_zone_iteration_nick.c b/src/namestore/test_namestore_api_zone_iteration_nick.c index 8a1b18cbf..8453edfc7 100644 --- a/src/namestore/test_namestore_api_zone_iteration_nick.c +++ b/src/namestore/test_namestore_api_zone_iteration_nick.c | |||
@@ -107,11 +107,6 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
107 | 107 | ||
108 | if (privkey2 != NULL) | 108 | if (privkey2 != NULL) |
109 | GNUNET_free (privkey2); | 109 | GNUNET_free (privkey2); |
110 | if (NULL != directory) | ||
111 | { | ||
112 | GNUNET_DISK_directory_remove (directory); | ||
113 | GNUNET_free (directory); | ||
114 | } | ||
115 | privkey2 = NULL; | 110 | privkey2 = NULL; |
116 | res = 1; | 111 | res = 1; |
117 | } | 112 | } |
@@ -160,11 +155,6 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
160 | if (nsh != NULL) | 155 | if (nsh != NULL) |
161 | GNUNET_NAMESTORE_disconnect (nsh); | 156 | GNUNET_NAMESTORE_disconnect (nsh); |
162 | nsh = NULL; | 157 | nsh = NULL; |
163 | if (NULL != directory) | ||
164 | { | ||
165 | GNUNET_DISK_directory_remove (directory); | ||
166 | GNUNET_free (directory); | ||
167 | } | ||
168 | } | 158 | } |
169 | 159 | ||
170 | static int | 160 | static int |
@@ -445,6 +435,7 @@ run (void *cls, | |||
445 | { | 435 | { |
446 | directory = NULL; | 436 | directory = NULL; |
447 | 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); | ||
448 | 439 | ||
449 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); | 440 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); |
450 | nsh = GNUNET_NAMESTORE_connect (cfg); | 441 | nsh = GNUNET_NAMESTORE_connect (cfg); |
@@ -467,13 +458,19 @@ int | |||
467 | main (int argc, char *argv[]) | 458 | main (int argc, char *argv[]) |
468 | { | 459 | { |
469 | res = 1; | 460 | res = 1; |
470 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore"); | ||
471 | if (0 != | 461 | if (0 != |
472 | GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration", | 462 | GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration", |
473 | "test_namestore_api.conf", | 463 | "test_namestore_api.conf", |
474 | &run, | 464 | &run, |
475 | NULL)) | 465 | NULL)) |
476 | return 1; | 466 | { |
467 | res = 1; | ||
468 | } | ||
469 | if (NULL != directory) | ||
470 | { | ||
471 | GNUNET_DISK_directory_remove (directory); | ||
472 | GNUNET_free (directory); | ||
473 | } | ||
477 | return res; | 474 | return res; |
478 | } | 475 | } |
479 | 476 | ||