diff options
author | Andrew Lewis <nerf@judo.za.org> | 2017-05-19 14:07:59 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2017-05-19 14:07:59 +0200 |
commit | 8976d8ff4ef5357abfe292892163a7002cf72134 (patch) | |
tree | 27b583618db097e488a961ccd6488bb112e6df2c /test | |
parent | 93a5203173727ebd4e3f03685ad55c68b2213852 (diff) | |
download | rspamd-8976d8ff4ef5357abfe292892163a7002cf72134.tar.gz rspamd-8976d8ff4ef5357abfe292892163a7002cf72134.zip |
[Minor] Fix tests
Diffstat (limited to 'test')
-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 |
4 files changed, 17 insertions, 3 deletions
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" |