aboutsummaryrefslogtreecommitdiffstats
path: root/test/CMakeLists.txt
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-27 15:55:46 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-27 15:55:46 +0000
commit349bc58cf6d025e4e50a325bda48d318b23b55fb (patch)
tree04681b3f213983ce8fc4335190ea9713f272510d /test/CMakeLists.txt
parent2f20e4f7fe5cf9b40dc8781675672e69437166e3 (diff)
downloadrspamd-349bc58cf6d025e4e50a325bda48d318b23b55fb.tar.gz
rspamd-349bc58cf6d025e4e50a325bda48d318b23b55fb.zip
Reorganize lua tests.
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r--test/CMakeLists.txt14
1 files changed, 11 insertions, 3 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 9932fb87d..32d5334cb 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -23,9 +23,17 @@ TARGET_LINK_LIBRARIES(rspamd-test ${RSPAMD_REQUIRED_LIBRARIES})
TARGET_LINK_LIBRARIES(rspamd-test stemmer)
IF(NOT ${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
- FILE(COPY "${CMAKE_CURRENT_SOURCE_DIR}/busted.lua"
- "${CMAKE_CURRENT_SOURCE_DIR}/busted"
- "${CMAKE_CURRENT_SOURCE_DIR}/lua"
+ FILE(COPY "${CMAKE_CURRENT_SOURCE_DIR}/lua"
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+
+ # Also add dependencies for convenience
+ FILE(GLOB LUA_TESTS "${CMAKE_CURRENT_SOURCE_DIR}/lua/*")
+ FOREACH(_LF IN LISTS "${LUA_TESTS}")
+ GET_FILENAME_COMPONENT(_NM _LF NAME)
+ ADD_CUSTOM_COMMAND(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_NM}"
+ "${CMAKE_COMMAND} -E copy_if_different ${_LF} ${CMAKE_CURRENT_BINARY_DIR}/${_NM}"
+ )
+ ADD_DEPENDENCIES(rspamd-test "${CMAKE_CURRENT_BINARY_DIR}/${_NM}")
+ ENDFOREACH()
ENDIF() \ No newline at end of file