From da24a3606f55c66d8e1ce283661640e491489870 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 24 Feb 2019 10:30:30 +0100 Subject: [PATCH] avoid failing hard if 'gnunetcheck' db does not exist (or plugins cannot be loaded for other reasons) --- src/namestore/test_namestore_api_lookup_shadow.c | 10 ++++------ src/namestore/test_namestore_api_remove.c | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/namestore/test_namestore_api_lookup_shadow.c b/src/namestore/test_namestore_api_lookup_shadow.c index f26593bb0..1938054d4 100644 --- a/src/namestore/test_namestore_api_lookup_shadow.c +++ b/src/namestore/test_namestore_api_lookup_shadow.c @@ -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", diff --git a/src/namestore/test_namestore_api_remove.c b/src/namestore/test_namestore_api_remove.c index 02c2672aa..4c3d55efc 100644 --- a/src/namestore/test_namestore_api_remove.c +++ b/src/namestore/test_namestore_api_remove.c @@ -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", -- 2.25.1