more code cleanup, better error handing in tests
authorChristian Grothoff <christian@grothoff.org>
Sun, 24 Feb 2019 12:10:35 +0000 (13:10 +0100)
committerChristian Grothoff <christian@grothoff.org>
Sun, 24 Feb 2019 12:10:35 +0000 (13:10 +0100)
src/namestore/test_namestore_api_zone_to_name.c

index 70abb9bb22a9e51190f9cfb0152e50a2676a3105..5d6444145ae1657a232be88da4bf6ff49d9cfb13 100644 (file)
@@ -240,6 +240,9 @@ run (void *cls,
 }
 
 
+#include "test_common.c"
+
+
 int
 main (int argc,
       char *argv[])
@@ -248,12 +251,7 @@ main (int argc,
   char *cfg_name;
 
   (void) argc;
-  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-zone-to-name",