From cc57e1d42bbfee97247ad7ea1db3fa81ecbf2c08 Mon Sep 17 00:00:00 2001 From: LRN Date: Mon, 9 Dec 2013 17:53:31 +0000 Subject: Remove test home at the beginning and at the VERY end --- src/namestore/test_namestore_api_zone_iteration.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'src/namestore/test_namestore_api_zone_iteration.c') diff --git a/src/namestore/test_namestore_api_zone_iteration.c b/src/namestore/test_namestore_api_zone_iteration.c index 9c9be53c7..20e927e51 100644 --- a/src/namestore/test_namestore_api_zone_iteration.c +++ b/src/namestore/test_namestore_api_zone_iteration.c @@ -105,11 +105,6 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) if (privkey2 != NULL) GNUNET_free (privkey2); privkey2 = NULL; - if (NULL != directory) - { - GNUNET_DISK_directory_remove (directory); - GNUNET_free (directory); - } res = 1; } @@ -156,11 +151,6 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) } if (nsh != NULL) GNUNET_NAMESTORE_disconnect (nsh); - if (NULL != directory) - { - GNUNET_DISK_directory_remove (directory); - GNUNET_free (directory); - } nsh = NULL; } @@ -435,6 +425,7 @@ run (void *cls, { directory = NULL; GNUNET_CONFIGURATION_get_value_string(cfg, "PATHS", "GNUNET_TEST_HOME", &directory); + GNUNET_DISK_directory_remove (directory); endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); nsh = GNUNET_NAMESTORE_connect (cfg); @@ -456,13 +447,19 @@ int main (int argc, char *argv[]) { res = 1; - GNUNET_DISK_directory_remove ("/tmp/test-gnunet-namestore"); if (0 != GNUNET_TESTING_peer_run ("test-namestore-api-zone-iteration", "test_namestore_api.conf", &run, NULL)) - return 1; + { + res = 1; + } + if (NULL != directory) + { + GNUNET_DISK_directory_remove (directory); + GNUNET_free (directory); + } return res; } -- cgit v1.2.3