From: Vsevolod Stakhov Date: Tue, 14 Jul 2015 13:45:46 +0000 (+0100) Subject: Fix unit test building and starting. X-Git-Tag: 1.0.0~374 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7eadc580cf37a633da4c32e78de6568de4287378;p=thirdparty%2Frspamd.git Fix unit test building and starting. --- diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a133935e6f..7c3312634c 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 72c2b5db6d..5dc854560f 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 ();