avoid failing hard if 'gnunetcheck' db does not exist
authorChristian Grothoff <christian@grothoff.org>
Sun, 24 Feb 2019 09:30:30 +0000 (10:30 +0100)
committerChristian Grothoff <christian@grothoff.org>
Sun, 24 Feb 2019 09:30:30 +0000 (10:30 +0100)
 (or plugins cannot be loaded for other reasons)

src/namestore/test_namestore_api_lookup_shadow.c
src/namestore/test_namestore_api_remove.c

index f26593bb097c04ab0fa5335acc4ee32fd4345cb5..1938054d4542bc9027651c36854057dce853db8c 100644 (file)
@@ -258,18 +258,16 @@ run (void *cls,
 }
 
 
+#include "test_common.c"
+
+
 int
 main (int argc, char *argv[])
 {
   const char *plugin_name;
   char *cfg_name;
 
-  plugin_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]);
-  GNUNET_asprintf (&cfg_name,
-                   "test_namestore_api_%s.conf",
-                   plugin_name);
-  GNUNET_DISK_purge_cfg_dir (cfg_name,
-                             "GNUNET_TEST_HOME");
+  SETUP_CFG (plugin_name, cfg_name);
   res = 1;
   if (0 !=
       GNUNET_TESTING_peer_run ("test-namestore-api-lookup-shadow",
index 02c2672aa4d5a141fb8f8d3ef32dc24369b76340..4c3d55efc6f60d10cc680b5710777ac15c562369 100644 (file)
@@ -197,18 +197,16 @@ run (void *cls,
 }
 
 
+#include "test_common.c"
+
+
 int
 main (int argc, char *argv[])
 {
   const char *plugin_name;
   char *cfg_name;
 
-  plugin_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]);
-  GNUNET_asprintf (&cfg_name,
-                   "test_namestore_api_%s.conf",
-                   plugin_name);
-  GNUNET_DISK_purge_cfg_dir (cfg_name,
-                             "GNUNET_TEST_HOME");
+  SETUP_CFG (plugin_name, cfg_name);
   res = 1;
   if (0 !=
       GNUNET_TESTING_peer_run ("test-namestore-api-remove",