aboutsummaryrefslogtreecommitdiffstats
path: root/test/rspamd_test_suite.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2012-03-01 20:14:32 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2012-03-01 20:14:32 +0400
commit9d703560099beea2b2b53c533e7f71dc926293b2 (patch)
treed60df5c9d3f7dbb9931dc1243362d1808f1ff459 /test/rspamd_test_suite.c
parent7dcf9f9bade26ca02b8706a2e4cb2066f6ba7b00 (diff)
downloadrspamd-9d703560099beea2b2b53c533e7f71dc926293b2.tar.gz
rspamd-9d703560099beea2b2b53c533e7f71dc926293b2.zip
Separate librspamdserver API from plugins and workers functions.
Make tests compileable again.
Diffstat (limited to 'test/rspamd_test_suite.c')
-rw-r--r--test/rspamd_test_suite.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/rspamd_test_suite.c b/test/rspamd_test_suite.c
index 423086506..f035fcb81 100644
--- a/test/rspamd_test_suite.c
+++ b/test/rspamd_test_suite.c
@@ -5,6 +5,8 @@
static gboolean do_debug;
struct rspamd_main *rspamd_main = NULL;
+struct event_base *base = NULL;
+worker_t *workers[] = { NULL };
static GOptionEntry entries[] =
{
@@ -15,7 +17,7 @@ static GOptionEntry entries[] =
int
main (int argc, char **argv)
{
- struct config_file *cfg;
+ struct config_file *cfg;
GError *error = NULL;
GOptionContext *context;
@@ -39,6 +41,8 @@ main (int argc, char **argv)
bzero (cfg, sizeof (struct config_file));
cfg->cfg_pool = memory_pool_new (memory_pool_get_size ());
+ base = event_init ();
+
if (do_debug) {
cfg->log_level = G_LOG_LEVEL_DEBUG;
}
@@ -46,11 +50,13 @@ main (int argc, char **argv)
cfg->log_level = G_LOG_LEVEL_INFO;
}
/* First set logger to console logger */
- rspamd_set_logger (RSPAMD_LOG_CONSOLE, TYPE_MAIN, rspamd_main);
+ rspamd_set_logger (RSPAMD_LOG_CONSOLE, g_quark_from_static_string("rspamd-test"), rspamd_main);
(void)open_log (rspamd_main->logger);
g_log_set_default_handler (rspamd_glib_log_function, rspamd_main->logger);
+#if 0
g_test_add_func ("/rspamd/memcached", rspamd_memcached_test_func);
+#endif
g_test_add_func ("/rspamd/mem_pool", rspamd_mem_pool_test_func);
g_test_add_func ("/rspamd/fuzzy", rspamd_fuzzy_test_func);
g_test_add_func ("/rspamd/url", rspamd_url_test_func);