]> source.dussan.org Git - rspamd.git/commitdiff
[Test] Integrate luacheck into test suite 1148/head
authorAndrew Lewis <nerf@judo.za.org>
Thu, 17 Nov 2016 11:56:31 +0000 (13:56 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Thu, 17 Nov 2016 11:56:31 +0000 (13:56 +0200)
circle.yml
test/functional/cases/200_luacheck.robot [new file with mode: 0644]
test/functional/cases/__init__.robot

index e1745e3cdd6109ea98936b565a46b2d54baab089..440a758257cfdc6b52c1b4e2f120e048a1a9e0f7 100644 (file)
@@ -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 (file)
index 0000000..d2fe186
--- /dev/null
@@ -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
index 3707f507bce59b909d942bf90fe5ab042e46f1f4..98abdc45b3abb88512e7bd156df23bcb0104b8dc 100644 (file)
@@ -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}