aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-11-17 12:43:19 +0000
committerGitHub <noreply@github.com>2016-11-17 12:43:19 +0000
commitacf64b4ac3773544743bf6773f43a26776ceafd5 (patch)
tree57c0e66a0f7779e60e4316bc38a1492963391b2e
parent2891c2f48a4c45fd08ee75111b95eec85683fd5d (diff)
parent3a303cdda967e737910f8629325054bebeedf010 (diff)
downloadrspamd-acf64b4ac3773544743bf6773f43a26776ceafd5.tar.gz
rspamd-acf64b4ac3773544743bf6773f43a26776ceafd5.zip
Merge pull request #1148 from fatalbanana/luacheck
[Test] Integrate luacheck into test suite
-rw-r--r--circle.yml1
-rw-r--r--test/functional/cases/200_luacheck.robot8
-rw-r--r--test/functional/cases/__init__.robot2
3 files changed, 10 insertions, 1 deletions
diff --git a/circle.yml b/circle.yml
index e1745e3cd..440a75825 100644
--- a/circle.yml
+++ b/circle.yml
@@ -13,7 +13,6 @@ test:
- cmake ../rspamd -DDBDIR=/nana -DENABLE_COVERAGE=ON -DCMAKE_INSTALL_PREFIX=../install
- make install
- RSPAMADM=../install/bin/rspamadm RSPAMC=../install/bin/rspamc RSPAMD=../install/bin/rspamd sudo -E robot -x xunit.xml --exclude isbroken ../rspamd/test/functional/cases
- - luacheck --config ../rspamd/.luacheckrc ../rspamd
- lcov --no-external -b ../rspamd -d ../rspamd -c --output-file coverage.info
- if [ ! -z $COVERALLS_REPO_TOKEN ]; then coveralls-lcov -t ${COVERALLS_REPO_TOKEN} coverage.info; fi
post:
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}