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

src/namestore/test_namestore_api_remove_not_existing_record.c

index fdbe9390f01db1f14818ba6e1a8aa78402ed78ec..c8110fe6bb992e2da806f4a681ed14e7b1e54aed 100644 (file)
@@ -152,18 +152,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-non-existing-record",