aboutsummaryrefslogtreecommitdiff
path: root/src/hostlist
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-05-10 13:47:27 +0200
committerChristian Grothoff <christian@grothoff.org>2018-05-10 13:47:27 +0200
commitbb230d4d990db60513c1e8083b46c7b8e91489f5 (patch)
tree41f70356aee58858324e92f6a145c1915b14ca3f /src/hostlist
parent4cb69d0abd7b44e57f3d0718ece5df05c33d4078 (diff)
downloadgnunet-bb230d4d990db60513c1e8083b46c7b8e91489f5.tar.gz
gnunet-bb230d4d990db60513c1e8083b46c7b8e91489f5.zip
fix testcase cleanup in hostlist tests
Diffstat (limited to 'src/hostlist')
-rw-r--r--src/hostlist/test_gnunet_daemon_hostlist.c18
-rw-r--r--src/hostlist/test_gnunet_daemon_hostlist_learning.c12
-rw-r--r--src/hostlist/test_gnunet_daemon_hostlist_reconnect.c18
3 files changed, 32 insertions, 16 deletions
diff --git a/src/hostlist/test_gnunet_daemon_hostlist.c b/src/hostlist/test_gnunet_daemon_hostlist.c
index eb4a85115..dcdabaf6b 100644
--- a/src/hostlist/test_gnunet_daemon_hostlist.c
+++ b/src/hostlist/test_gnunet_daemon_hostlist.c
@@ -265,16 +265,22 @@ main (int argc, char *argv[])
265{ 265{
266 int ret; 266 int ret;
267 267
268 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-1"); 268 GNUNET_DISK_purge_cfg_dir ("test_gnunet_daemon_hostlist_peer1.conf",
269 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-2"); 269 "GNUNET_TEST_HOME");
270 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist"); 270 GNUNET_DISK_purge_cfg_dir ("test_gnunet_daemon_hostlist_peer2.conf",
271 "GNUNET_TEST_HOME");
272 GNUNET_DISK_purge_cfg_dir ("test_gnunet_daemon_hostlist_data.conf",
273 "GNUNET_TEST_HOME");
271 GNUNET_log_setup ("test-gnunet-daemon-hostlist", 274 GNUNET_log_setup ("test-gnunet-daemon-hostlist",
272 "WARNING", 275 "WARNING",
273 NULL); 276 NULL);
274 ret = check (); 277 ret = check ();
275 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-1"); 278 GNUNET_DISK_purge_cfg_dir ("test_gnunet_daemon_hostlist_peer1.conf",
276 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-2"); 279 "GNUNET_TEST_HOME");
277 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist"); 280 GNUNET_DISK_purge_cfg_dir ("test_gnunet_daemon_hostlist_peer2.conf",
281 "GNUNET_TEST_HOME");
282 GNUNET_DISK_purge_cfg_dir ("test_gnunet_daemon_hostlist_data.conf",
283 "GNUNET_TEST_HOME");
278 return ret; 284 return ret;
279} 285}
280 286
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_learning.c b/src/hostlist/test_gnunet_daemon_hostlist_learning.c
index 88ad22a1a..799ffc3ff 100644
--- a/src/hostlist/test_gnunet_daemon_hostlist_learning.c
+++ b/src/hostlist/test_gnunet_daemon_hostlist_learning.c
@@ -562,14 +562,18 @@ main (int argc, char *argv[])
562{ 562{
563 int ret; 563 int ret;
564 564
565 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-1"); 565 GNUNET_DISK_purge_cfg_dir ("test_learning_learn_peer.conf",
566 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-2"); 566 "GNUNET_TEST_HOME");
567 GNUNET_DISK_purge_cfg_dir ("test_learning_adv_peer.conf",
568 "GNUNET_TEST_HOME");
567 GNUNET_log_setup ("test-gnunet-daemon-hostlist", 569 GNUNET_log_setup ("test-gnunet-daemon-hostlist",
568 "WARNING", 570 "WARNING",
569 NULL); 571 NULL);
570 ret = check (); 572 ret = check ();
571 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-1"); 573 GNUNET_DISK_purge_cfg_dir ("test_learning_learn_peer.conf",
572 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-2"); 574 "GNUNET_TEST_HOME");
575 GNUNET_DISK_purge_cfg_dir ("test_learning_adv_peer.conf",
576 "GNUNET_TEST_HOME");
573 if (GNUNET_YES == 577 if (GNUNET_YES ==
574 GNUNET_DISK_file_test ("hostlists_learn_peer.file")) 578 GNUNET_DISK_file_test ("hostlists_learn_peer.file"))
575 { 579 {
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
index 2ebc780a7..2ab55b668 100644
--- a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
+++ b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
@@ -242,9 +242,12 @@ main (int argcx,
242 GNUNET_GETOPT_OPTION_END 242 GNUNET_GETOPT_OPTION_END
243 }; 243 };
244 244
245 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-1"); 245 GNUNET_DISK_purge_cfg_dir ("test_gnunet_daemon_hostlist_peer1.conf",
246 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-2"); 246 "GNUNET_TEST_HOME");
247 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-3"); 247 GNUNET_DISK_purge_cfg_dir ("test_gnunet_daemon_hostlist_peer2.conf",
248 "GNUNET_TEST_HOME");
249 GNUNET_DISK_purge_cfg_dir ("test_gnunet_daemon_hostlist_data.conf",
250 "GNUNET_TEST_HOME");
248 GNUNET_log_setup ("test-gnunet-daemon-hostlist", 251 GNUNET_log_setup ("test-gnunet-daemon-hostlist",
249 "WARNING", 252 "WARNING",
250 NULL); 253 NULL);
@@ -272,9 +275,12 @@ main (int argcx,
272 "%s", 275 "%s",
273 ".\n"); 276 ".\n");
274 } 277 }
275 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-1"); 278 GNUNET_DISK_purge_cfg_dir ("test_gnunet_daemon_hostlist_peer1.conf",
276 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-2"); 279 "GNUNET_TEST_HOME");
277 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-hostlist-peer-3"); 280 GNUNET_DISK_purge_cfg_dir ("test_gnunet_daemon_hostlist_peer2.conf",
281 "GNUNET_TEST_HOME");
282 GNUNET_DISK_purge_cfg_dir ("test_gnunet_daemon_hostlist_data.conf",
283 "GNUNET_TEST_HOME");
278 return ok; 284 return ok;
279} 285}
280 286