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_store_update.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_store_update.c')
-rw-r--r-- | src/namestore/test_namestore_api_store_update.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/namestore/test_namestore_api_store_update.c b/src/namestore/test_namestore_api_store_update.c index 213d934bf..c0300fa27 100644 --- a/src/namestore/test_namestore_api_store_update.c +++ b/src/namestore/test_namestore_api_store_update.c | |||
@@ -83,11 +83,6 @@ cleanup () | |||
83 | GNUNET_free (privkey); | 83 | GNUNET_free (privkey); |
84 | privkey = NULL; | 84 | privkey = NULL; |
85 | } | 85 | } |
86 | if (NULL != directory) | ||
87 | { | ||
88 | GNUNET_DISK_directory_remove (directory); | ||
89 | GNUNET_free (directory); | ||
90 | } | ||
91 | GNUNET_SCHEDULER_shutdown (); | 86 | GNUNET_SCHEDULER_shutdown (); |
92 | } | 87 | } |
93 | 88 | ||
@@ -239,6 +234,7 @@ run (void *cls, | |||
239 | 234 | ||
240 | directory = NULL; | 235 | directory = NULL; |
241 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); | 236 | GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); |
237 | GNUNET_DISK_directory_remove (directory); | ||
242 | 238 | ||
243 | update_performed = GNUNET_NO; | 239 | update_performed = GNUNET_NO; |
244 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 240 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
@@ -280,14 +276,20 @@ run (void *cls, | |||
280 | int | 276 | int |
281 | main (int argc, char *argv[]) | 277 | main (int argc, char *argv[]) |
282 | { | 278 | { |
283 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore/"); | ||
284 | res = 1; | 279 | res = 1; |
285 | if (0 != | 280 | if (0 != |
286 | GNUNET_TESTING_peer_run ("test-namestore-api-store-update", | 281 | GNUNET_TESTING_peer_run ("test-namestore-api-store-update", |
287 | "test_namestore_api.conf", | 282 | "test_namestore_api.conf", |
288 | &run, | 283 | &run, |
289 | NULL)) | 284 | NULL)) |
290 | return 1; | 285 | { |
286 | res = 1; | ||
287 | } | ||
288 | if (NULL != directory) | ||
289 | { | ||
290 | GNUNET_DISK_directory_remove (directory); | ||
291 | GNUNET_free (directory); | ||
292 | } | ||
291 | return res; | 293 | return res; |
292 | } | 294 | } |
293 | 295 | ||