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_specific_zone.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_specific_zone.c')
-rw-r--r-- | src/namestore/test_namestore_api_zone_iteration_specific_zone.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c index bd4c5cc93..0a85b5182 100644 --- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c +++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c | |||
@@ -104,12 +104,6 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
104 | if (privkey2 != NULL) | 104 | if (privkey2 != NULL) |
105 | GNUNET_free (privkey2); | 105 | GNUNET_free (privkey2); |
106 | privkey2 = NULL; | 106 | privkey2 = NULL; |
107 | |||
108 | if (NULL != directory) | ||
109 | { | ||
110 | GNUNET_DISK_directory_remove (directory); | ||
111 | GNUNET_free (directory); | ||
112 | } | ||
113 | res = 1; | 107 | res = 1; |
114 | } | 108 | } |
115 | 109 | ||
@@ -158,11 +152,6 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
158 | if (nsh != NULL) | 152 | if (nsh != NULL) |
159 | GNUNET_NAMESTORE_disconnect (nsh); | 153 | GNUNET_NAMESTORE_disconnect (nsh); |
160 | nsh = NULL; | 154 | nsh = NULL; |
161 | if (NULL != directory) | ||
162 | { | ||
163 | GNUNET_DISK_directory_remove (directory); | ||
164 | GNUNET_free (directory); | ||
165 | } | ||
166 | } | 155 | } |
167 | 156 | ||
168 | 157 | ||
@@ -411,6 +400,7 @@ run (void *cls, | |||
411 | { | 400 | { |
412 | directory = NULL; | 401 | directory = NULL; |
413 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | 402 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); |
403 | GNUNET_DISK_directory_remove (directory); | ||
414 | 404 | ||
415 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); | 405 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); |
416 | nsh = GNUNET_NAMESTORE_connect (cfg); | 406 | nsh = GNUNET_NAMESTORE_connect (cfg); |
@@ -432,14 +422,20 @@ run (void *cls, | |||
432 | int | 422 | int |
433 | main (int argc, char *argv[]) | 423 | main (int argc, char *argv[]) |
434 | { | 424 | { |
435 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore/"); | ||
436 | res = 1; | 425 | res = 1; |
437 | if (0 != | 426 | if (0 != |
438 | GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration", | 427 | GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration", |
439 | "test_namestore_api.conf", | 428 | "test_namestore_api.conf", |
440 | &run, | 429 | &run, |
441 | NULL)) | 430 | NULL)) |
442 | return 1; | 431 | { |
432 | res = 1; | ||
433 | } | ||
434 | if (NULL != directory) | ||
435 | { | ||
436 | GNUNET_DISK_directory_remove (directory); | ||
437 | GNUNET_free (directory); | ||
438 | } | ||
443 | return res; | 439 | return res; |
444 | } | 440 | } |
445 | 441 | ||