diff options
-rw-r--r-- | circle.yml | 2 | ||||
-rw-r--r-- | test/functional/cases/__init__.robot | 2 | ||||
-rw-r--r-- | test/functional/configs/plugins.conf | 4 | ||||
-rw-r--r-- | test/functional/configs/pluginsplus.conf | 2 | ||||
-rw-r--r-- | test/functional/lib/rspamd.py | 12 |
5 files changed, 18 insertions, 4 deletions
diff --git a/circle.yml b/circle.yml index 51e83a870..d9fe138aa 100644 --- a/circle.yml +++ b/circle.yml @@ -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: diff --git a/test/functional/cases/__init__.robot b/test/functional/cases/__init__.robot index 98abdc45b..231387974 100644 --- a/test/functional/cases/__init__.robot +++ b/test/functional/cases/__init__.robot @@ -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} diff --git a/test/functional/configs/plugins.conf b/test/functional/configs/plugins.conf index bee8fc65a..a11070cee 100644 --- a/test/functional/configs/plugins.conf +++ b/test/functional/configs/plugins.conf @@ -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} diff --git a/test/functional/configs/pluginsplus.conf b/test/functional/configs/pluginsplus.conf index 2ce3df263..ea86635d3 100644 --- a/test/functional/configs/pluginsplus.conf +++ b/test/functional/configs/pluginsplus.conf @@ -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; diff --git a/test/functional/lib/rspamd.py b/test/functional/lib/rspamd.py index a2be23e87..1ae6e95a1 100644 --- a/test/functional/lib/rspamd.py +++ b/test/functional/lib/rspamd.py @@ -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" |