summaryrefslogtreecommitdiffstats
path: root/test/rspamd_lua_test.c
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/rspamd_lua_test.c
parent2f20e4f7fe5cf9b40dc8781675672e69437166e3 (diff)
downloadrspamd-349bc58cf6d025e4e50a325bda48d318b23b55fb.tar.gz
rspamd-349bc58cf6d025e4e50a325bda48d318b23b55fb.zip
Reorganize lua tests.
Diffstat (limited to 'test/rspamd_lua_test.c')
-rw-r--r--test/rspamd_lua_test.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/rspamd_lua_test.c b/test/rspamd_lua_test.c
index 46303b356..da9405fa5 100644
--- a/test/rspamd_lua_test.c
+++ b/test/rspamd_lua_test.c
@@ -37,6 +37,7 @@ rspamd_lua_test_func (void)
glob_t globbuf;
gchar *pattern;
guint i, len;
+ struct stat st;
msg_info ("Starting lua tests");
@@ -54,6 +55,15 @@ rspamd_lua_test_func (void)
for (i = 0; i < globbuf.gl_pathc; i++) {
lua_file = globbuf.gl_pathv[i];
+ if (stat (lua_file, &st) == -1 || !S_ISREG (st.st_mode)) {
+ continue;
+ }
+
+ if (strstr (lua_file, "busted") != NULL) {
+ /* Skip busted code itself */
+ continue;
+ }
+
if (luaL_loadfile (L, lua_file) != 0) {
msg_err ("load test from %s failed", lua_file);
g_assert (0);