]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix tests
authorAndrew Lewis <nerf@judo.za.org>
Fri, 19 May 2017 12:07:59 +0000 (14:07 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Fri, 19 May 2017 12:07:59 +0000 (14:07 +0200)
circle.yml
test/functional/cases/__init__.robot
test/functional/configs/plugins.conf
test/functional/configs/pluginsplus.conf
test/functional/lib/rspamd.py

index 51e83a8700bf2e2b8e14214bedb16d6cc1b435a2..d9fe138aa67851950a9c14004150b31ce59478c4 100644 (file)
@@ -12,7 +12,7 @@ test:
     - mkdir ../build ; mkdir ../install ; cd ../build
     - cmake ../rspamd -DDBDIR=/nana -DENABLE_COVERAGE=ON -DCMAKE_INSTALL_PREFIX=../install -DENABLE_HIREDIS=ON
     - make install -j`nproc`
-    - RSPAMADM=../install/bin/rspamadm RSPAMC=../install/bin/rspamc RSPAMD=../install/bin/rspamd sudo -E robot -x xunit.xml --exclude isbroken ../rspamd/test/functional/cases
+    - RSPAMD_INSTALLROOT=../install sudo -E robot -x xunit.xml --exclude isbroken ../rspamd/test/functional/cases
     - 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 || true; fi
   post:
index 98abdc45b3abb88512e7bd156df23bcb0104b8dc..2313879745dd6a977a1bd88830491aae8fa40325 100644 (file)
@@ -10,6 +10,8 @@ Export Global Variables
   ${RSPAMADM} =  Get Rspamadm
   ${RSPAMC} =  Get Rspamc
   ${RSPAMD} =  Get Rspamd
+  ${INSTALLROOT} =  Get Install Root
+  Set Global Variable  ${INSTALLROOT}
   Set Global Variable  ${RSPAMADM}
   Set Global Variable  ${RSPAMC}
   Set Global Variable  ${RSPAMD}
index bee8fc65a98fe44288394dd77f4c145af73185af..a11070cee934a93b433937ee6d4257ab34ac8275 100644 (file)
@@ -2,7 +2,7 @@ options = {
        filters = ["spf", "dkim", "regexp"]
        url_tld = "${URL_TLD}"
        pidfile = "${TMPDIR}/rspamd.pid"
-       lua_path = "${TESTDIR}/../../contrib/lua-fun/?.lua"
+       lua_path = "${INSTALLROOT}/share/rspamd/lib/?.lua"
        dns {
                nameserver = ["8.8.8.8", "8.8.4.4"];
                retransmits = 10;
@@ -30,5 +30,5 @@ worker {
 modules {
     path = "${TESTDIR}/../../src/plugins/lua/"
 }
-lua = "${TESTDIR}/../../lualib/global_functions.lua"
+lua = "${INSTALLROOT}/share/rspamd/rules/rspamd.lua"
 ${PLUGIN_CONFIG}
index 2ce3df263b8016922b02a889130189f6848129a4..ea86635d310c1820414236354e11e5eebe59ada7 100644 (file)
@@ -2,7 +2,7 @@ options = {
        filters = ["spf", "dkim", "regexp"]
        url_tld = "${URL_TLD}"
        pidfile = "${TMPDIR}/rspamd.pid"
-       lua_path = "${TESTDIR}/../../contrib/lua-fun/?.lua"
+       lua_path = "${INSTALLROOT}/share/rspamd/lib/?.lua"
        dns {
                nameserver = ["8.8.8.8", "8.8.4.4"];
                retransmits = 10;
index a2be23e87a92975e1006c76cd5e43966d4fef018..1ae6e95a188181d2889de90ca3c34a8e1f60f50c 100644 (file)
@@ -45,19 +45,31 @@ def get_top_dir():
 
     return get_test_directory() + "/../../"
 
+def get_install_root():
+    if os.environ.get('RSPAMD_INSTALLROOT'):
+        return os.path.abspath(os.environ['RSPAMD_INSTALLROOT'])
+
+    return os.path.abspath("../install/")
+
 def get_rspamd():
     if os.environ.get('RSPAMD'):
         return os.environ['RSPAMD']
+    if os.environ.get('RSPAMD_INSTALLROOT'):
+        return os.environ['RSPAMD_INSTALLROOT'] + "/bin/rspamd"
     dname = get_top_dir()
     return dname + "/src/rspamd"
 def get_rspamc():
     if os.environ.get('RSPAMC'):
         return os.environ['RSPAMC']
+    if os.environ.get('RSPAMD_INSTALLROOT'):
+        return os.environ['RSPAMD_INSTALLROOT'] + "/bin/rspamc"
     dname = get_top_dir()
     return dname + "/src/client/rspamc"
 def get_rspamadm():
     if os.environ.get('RSPAMADM'):
         return os.environ['RSPAMADM']
+    if os.environ.get('RSPAMD_INSTALLROOT'):
+        return os.environ['RSPAMD_INSTALLROOT'] + "/bin/rspamadm"
     dname = get_top_dir()
     return dname + "/src/rspamadm/rspamadm"