From 7eadc580cf37a633da4c32e78de6568de4287378 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 14 Jul 2015 14:45:46 +0100 Subject: Fix unit test building and starting. --- test/CMakeLists.txt | 4 ++-- test/rspamd_test_suite.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a133935e6..7c3312634 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -43,7 +43,7 @@ IF(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}") ADD_CUSTOM_TARGET(units-dir COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/lua/unit" ) - ADD_DEPENDENCIES(rspamd-func-test units-dir) + ADD_DEPENDENCIES(rspamd-test units-dir) FOREACH(_LF IN LISTS LUA_TESTS) GET_FILENAME_COMPONENT(_NM "${_LF}" NAME) IF("${_LF}" MATCHES "^.*/unit/.*$") @@ -55,7 +55,7 @@ IF(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}") ${CMAKE_COMMAND} -E copy_if_different ${_LF} ${_DS} SOURCES "${_LF}" ) - ADD_DEPENDENCIES(rspamd-func-test "${_NM}") + ADD_DEPENDENCIES(rspamd-test "${_NM}") ENDFOREACH() ADD_CUSTOM_TARGET(functional-dir COMMAND diff --git a/test/rspamd_test_suite.c b/test/rspamd_test_suite.c index 72c2b5db6..5dc854560 100644 --- a/test/rspamd_test_suite.c +++ b/test/rspamd_test_suite.c @@ -2,6 +2,7 @@ #include "main.h" #include "cfg_file.h" #include "regexp.h" +#include "libstat/stat_api.h" #include "tests.h" struct rspamd_main *rspamd_main = NULL; @@ -31,6 +32,7 @@ main (int argc, char **argv) g_test_init (&argc, &argv, NULL); rspamd_init_libs (); + rspamd_stat_init (cfg); base = event_init (); -- cgit v1.2.3