summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2016-11-17 13:56:31 +0200
committerAndrew Lewis <nerf@judo.za.org>2016-11-17 13:56:31 +0200
commit3a303cdda967e737910f8629325054bebeedf010 (patch)
treecd4e65285c3b7750f7122aa9eba77b27184fc8bf /test
parentd8e7133b3af3e169e894e436c24286d824b255d0 (diff)
downloadrspamd-3a303cdda967e737910f8629325054bebeedf010.tar.gz
rspamd-3a303cdda967e737910f8629325054bebeedf010.zip
[Test] Integrate luacheck into test suite
Diffstat (limited to 'test')
-rw-r--r--test/functional/cases/200_luacheck.robot8
-rw-r--r--test/functional/cases/__init__.robot2
2 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/cases/200_luacheck.robot b/test/functional/cases/200_luacheck.robot
new file mode 100644
index 000000000..d2fe18628
--- /dev/null
+++ b/test/functional/cases/200_luacheck.robot
@@ -0,0 +1,8 @@
+*** Settings ***
+Library Process
+
+*** Test Cases ***
+Lua Check
+ ${result} = Run Process luacheck -q --no-color . cwd=${TOPDIR}
+ Run Keyword If ${result.rc} != 0 Log ${result.stdout}
+ Should Be Equal As Integers ${result.rc} 0 msg=${result.stdout} values=false
diff --git a/test/functional/cases/__init__.robot b/test/functional/cases/__init__.robot
index 3707f507b..98abdc45b 100644
--- a/test/functional/cases/__init__.robot
+++ b/test/functional/cases/__init__.robot
@@ -6,6 +6,7 @@ Variables ../lib/vars.py
*** Keywords ***
Export Global Variables
${TESTDIR} = Get Test Directory
+ ${TOPDIR} = Get Top Dir
${RSPAMADM} = Get Rspamadm
${RSPAMC} = Get Rspamc
${RSPAMD} = Get Rspamd
@@ -13,3 +14,4 @@ Export Global Variables
Set Global Variable ${RSPAMC}
Set Global Variable ${RSPAMD}
Set Global Variable ${TESTDIR}
+ Set Global Variable ${TOPDIR}