test_datacache_sqlite_SOURCES = \
test_datacache.c
test_datacache_sqlite_LDADD = \
+ $(top_builddir)/src/testing/libgnunettesting.la \
$(top_builddir)/src/datacache/libgnunetdatacache.la \
$(top_builddir)/src/util/libgnunetutil.la
test_datacache_quota_sqlite_SOURCES = \
test_datacache_quota.c
test_datacache_quota_sqlite_LDADD = \
+ $(top_builddir)/src/testing/libgnunettesting.la \
$(top_builddir)/src/datacache/libgnunetdatacache.la \
$(top_builddir)/src/util/libgnunetutil.la
perf_datacache_sqlite_SOURCES = \
perf_datacache.c
perf_datacache_sqlite_LDADD = \
+ $(top_builddir)/src/testing/libgnunettesting.la \
$(top_builddir)/src/datacache/libgnunetdatacache.la \
$(top_builddir)/src/util/libgnunetutil.la
test_datacache_mysql_SOURCES = \
test_datacache.c
test_datacache_mysql_LDADD = \
+ $(top_builddir)/src/testing/libgnunettesting.la \
$(top_builddir)/src/datacache/libgnunetdatacache.la \
$(top_builddir)/src/util/libgnunetutil.la
test_datacache_quota_mysql_SOURCES = \
test_datacache_quota.c
test_datacache_quota_mysql_LDADD = \
+ $(top_builddir)/src/testing/libgnunettesting.la \
$(top_builddir)/src/datacache/libgnunetdatacache.la \
$(top_builddir)/src/util/libgnunetutil.la
perf_datacache_mysql_SOURCES = \
perf_datacache.c
perf_datacache_mysql_LDADD = \
+ $(top_builddir)/src/testing/libgnunettesting.la \
$(top_builddir)/src/datacache/libgnunetdatacache.la \
$(top_builddir)/src/util/libgnunetutil.la
test_datacache_postgres_SOURCES = \
test_datacache.c
test_datacache_postgres_LDADD = \
+ $(top_builddir)/src/testing/libgnunettesting.la \
$(top_builddir)/src/datacache/libgnunetdatacache.la \
$(top_builddir)/src/util/libgnunetutil.la
test_datacache_quota_postgres_SOURCES = \
test_datacache_quota.c
test_datacache_quota_postgres_LDADD = \
+ $(top_builddir)/src/testing/libgnunettesting.la \
$(top_builddir)/src/datacache/libgnunetdatacache.la \
$(top_builddir)/src/util/libgnunetutil.la
perf_datacache_postgres_SOURCES = \
perf_datacache.c
perf_datacache_postgres_LDADD = \
+ $(top_builddir)/src/testing/libgnunettesting.la \
$(top_builddir)/src/datacache/libgnunetdatacache.la \
$(top_builddir)/src/util/libgnunetutil.la
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_datacache_lib.h"
+#include "gnunet_testing_lib-new.h"
#include <gauger.h>
-#define VERBOSE GNUNET_NO
#define ASSERT(x) do { if (! (x)) { printf("Error at %s:%d\n", __FILE__, __LINE__); goto FAILURE;} } while (0)
int
main (int argc, char *argv[])
{
- char *pos;
char cfg_name[128];
-
char *const xargv[] = {
"perf-datacache",
"-c",
cfg_name,
-#if VERBOSE
- "-L", "DEBUG",
-#endif
NULL
};
struct GNUNET_GETOPT_CommandLineOption options[] = {
};
GNUNET_log_setup ("perf-datacache",
-#if VERBOSE
- "DEBUG",
-#else
"WARNING",
-#endif
NULL);
- /* determine name of plugin to use */
- plugin_name = argv[0];
- while (NULL != (pos = strstr (plugin_name, "_")))
- plugin_name = pos + 1;
- if (NULL != (pos = strstr (plugin_name, ".")))
- pos[0] = 0;
- else
- pos = (char *) plugin_name;
-
+ plugin_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]);
GNUNET_snprintf (cfg_name, sizeof (cfg_name), "perf_datacache_data_%s.conf",
plugin_name);
- if (pos != plugin_name)
- pos[0] = '.';
GNUNET_PROGRAM_run ((sizeof (xargv) / sizeof (char *)) - 1, xargv,
"perf-datacache", "nohelp", options, &run, NULL);
if (ok != 0)
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_datacache_lib.h"
+#include "gnunet_testing_lib-new.h"
#define ASSERT(x) do { if (! (x)) { printf("Error at %s:%d\n", __FILE__, __LINE__); goto FAILURE;} } while (0)
int
main (int argc, char *argv[])
{
- char *pos;
char cfg_name[128];
-
char *const xargv[] = {
"test-datacache",
"-c",
GNUNET_log_setup ("test-datacache",
"WARNING",
NULL);
- /* determine name of plugin to use */
- plugin_name = argv[0];
- while (NULL != (pos = strstr (plugin_name, "_")))
- plugin_name = pos + 1;
- if (NULL != (pos = strstr (plugin_name, ".")))
- pos[0] = 0;
- else
- pos = (char *) plugin_name;
-
+ plugin_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]);
GNUNET_snprintf (cfg_name, sizeof (cfg_name), "test_datacache_data_%s.conf",
plugin_name);
- if (pos != plugin_name)
- pos[0] = '.';
GNUNET_PROGRAM_run ((sizeof (xargv) / sizeof (char *)) - 1, xargv,
"test-datacache", "nohelp", options, &run, NULL);
- if (ok != 0)
+ if (0 != ok)
FPRINTF (stderr, "Missed some testcases: %d\n", ok);
return ok;
}
#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_datacache_lib.h"
-
-#define VERBOSE GNUNET_NO
+#include "gnunet_testing_lib-new.h"
#define ASSERT(x) do { if (! (x)) { printf("Error at %s:%d\n", __FILE__, __LINE__); goto FAILURE;} } while (0)
int
main (int argc, char *argv[])
{
- char *pos;
char cfg_name[128];
-
char *const xargv[] = {
"test-datacache-quota",
"-c",
cfg_name,
-#if VERBOSE
- "-L", "DEBUG",
-#endif
NULL
};
struct GNUNET_GETOPT_CommandLineOption options[] = {
};
GNUNET_log_setup ("test-datacache-quota",
-#if VERBOSE
- "DEBUG",
-#else
"WARNING",
-#endif
NULL);
- /* determine name of plugin to use */
- plugin_name = argv[0];
- while (NULL != (pos = strstr (plugin_name, "_")))
- plugin_name = pos + 1;
- if (NULL != (pos = strstr (plugin_name, ".")))
- pos[0] = 0;
- else
- pos = (char *) plugin_name;
-
+ plugin_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]);
GNUNET_snprintf (cfg_name, sizeof (cfg_name), "test_datacache_data_%s.conf",
plugin_name);
- if (pos != plugin_name)
- pos[0] = '.';
GNUNET_PROGRAM_run ((sizeof (xargv) / sizeof (char *)) - 1, xargv,
"test-datacache-quota", "nohelp", options, &run, NULL);
- if (ok != 0)
+ if (0 != ok)
FPRINTF (stderr, "Missed some testcases: %d\n", ok);
return ok;
}
perf_plugin_datastore_sqlite_SOURCES = \
perf_plugin_datastore.c
perf_plugin_datastore_sqlite_LDADD = \
+ $(top_builddir)/src/testing/libgnunettesting.la \
$(top_builddir)/src/util/libgnunetutil.la
test_plugin_datastore_sqlite_SOURCES = \
test_plugin_datastore.c
test_plugin_datastore_sqlite_LDADD = \
+ $(top_builddir)/src/testing/libgnunettesting.la \
$(top_builddir)/src/util/libgnunetutil.la
test_plugin_datastore_mysql_SOURCES = \
test_plugin_datastore.c
test_plugin_datastore_mysql_LDADD = \
+ $(top_builddir)/src/testing/libgnunettesting.la \
$(top_builddir)/src/util/libgnunetutil.la
perf_plugin_datastore_mysql_SOURCES = \
perf_plugin_datastore.c
perf_plugin_datastore_mysql_LDADD = \
+ $(top_builddir)/src/testing/libgnunettesting.la \
$(top_builddir)/src/util/libgnunetutil.la
test_plugin_datastore_postgres_SOURCES = \
test_plugin_datastore.c
test_plugin_datastore_postgres_LDADD = \
+ $(top_builddir)/src/testing/libgnunettesting.la \
$(top_builddir)/src/util/libgnunetutil.la
perf_plugin_datastore_postgres_SOURCES = \
perf_plugin_datastore.c
perf_plugin_datastore_postgres_LDADD = \
+ $(top_builddir)/src/testing/libgnunettesting.la \
$(top_builddir)/src/util/libgnunetutil.la
int
main (int argc, char *argv[])
{
- char *pos;
char cfg_name[128];
- /* determine name of plugin to use */
- plugin_name = argv[0];
- while (NULL != (pos = strstr (plugin_name, "_")))
- plugin_name = pos + 1;
- if (NULL != (pos = strstr (plugin_name, ".")))
- pos[0] = '\0';
- else
- pos = (char *) plugin_name;
+ plugin_name = GNUNET_TESTING_get_testname_from_underscoare (argv[0]);
GNUNET_snprintf (cfg_name, sizeof (cfg_name),
"test_datastore_api_data_%s.conf", plugin_name);
if (0 !=
#include "gnunet_util_lib.h"
#include "gnunet_protocols.h"
#include "gnunet_datastore_plugin.h"
+#include "gnunet_testing_lib-new.h"
#include <gauger.h>
/**
int
main (int argc, char *argv[])
{
- char *pos;
char dir_name[128];
char cfg_name[128];
char *const argv[] = {
GNUNET_GETOPT_OPTION_END
};
- /* determine name of plugin to use */
- plugin_name = argv[0];
- while (NULL != (pos = strstr (plugin_name, "_")))
- plugin_name = pos + 1;
- if (NULL != (pos = strstr (plugin_name, ".")))
- pos[0] = 0;
- else
- pos = (char *) plugin_name;
+ plugin_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]);
GNUNET_snprintf (dir_name, sizeof (dir_name), "/tmp/perf-gnunet-datastore-%s",
plugin_name);
GNUNET_DISK_directory_remove (dir_name);
"perf-plugin-datastore", "nohelp", options, &run, NULL);
if (ok != 0)
FPRINTF (stderr, "Missed some testcases: %u\n", ok);
- if (pos != plugin_name)
- pos[0] = '.';
GNUNET_DISK_directory_remove (dir_name);
return ok;
int
main (int argc, char *argv[])
{
- char *pos;
char cfg_name[128];
- /* determine name of plugin to use */
- plugin_name = argv[0];
- while (NULL != (pos = strstr (plugin_name, "_")))
- plugin_name = pos + 1;
- if (NULL != (pos = strstr (plugin_name, ".")))
- pos[0] = '\0';
- else
- pos = (char *) plugin_name;
+ plugin_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]);
GNUNET_snprintf (cfg_name, sizeof (cfg_name),
"test_datastore_api_data_%s.conf", plugin_name);
if (0 !=
int
main (int argc, char *argv[])
{
- char *pos;
char cfg_name[128];
- /* determine name of plugin to use */
- plugin_name = argv[0];
- while (NULL != (pos = strstr (plugin_name, "_")))
- plugin_name = pos + 1;
- if (NULL != (pos = strstr (plugin_name, ".")))
- pos[0] = 0;
- else
- pos = (char *) plugin_name;
+ plugin_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]);
GNUNET_snprintf (cfg_name, sizeof (cfg_name),
"test_datastore_api_data_%s.conf", plugin_name);
if (0 !=
#include "gnunet_util_lib.h"
#include "gnunet_protocols.h"
#include "gnunet_datastore_plugin.h"
+#include "gnunet_testing_lib-new.h"
/**
* Number of put operations to perform.
}
-
int
main (int argc, char *argv[])
{
- char *pos;
char dir_name[128];
char cfg_name[128];
char *const xargv[] = {
};
/* determine name of plugin to use */
- plugin_name = argv[0];
- while (NULL != (pos = strstr (plugin_name, "_")))
- plugin_name = pos + 1;
- if (NULL != (pos = strstr (plugin_name, ".")))
- pos[0] = 0;
- else
- pos = (char *) plugin_name;
-
+ plugin_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]);
GNUNET_snprintf (dir_name, sizeof (dir_name),
"/tmp/test-gnunet-datastore-plugin-%s", plugin_name);
GNUNET_DISK_directory_remove (dir_name);
"test_plugin_datastore_data_%s.conf", plugin_name);
GNUNET_PROGRAM_run ((sizeof (xargv) / sizeof (char *)) - 1, xargv,
"test-plugin-datastore", "nohelp", options, &run, NULL);
- if (ok != 0)
+ if (0 != ok)
FPRINTF (stderr, "Missed some testcases: %u\n", ok);
- if (pos != plugin_name)
- pos[0] = '.';
GNUNET_DISK_directory_remove (dir_name);
return ok;
}