]> source.dussan.org Git - rspamd.git/commitdiff
[Test] Fix multiple test issues
authorVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 15 Nov 2022 20:15:37 +0000 (20:15 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 15 Nov 2022 20:25:52 +0000 (20:25 +0000)
test/functional/configs/merged.conf
test/functional/lib/rspamd.robot

index 60930f657c6cb3fc2c67eea56236d6600560b62e..0718d0210a329fdca7a747641e59eee88b97ddc7 100644 (file)
@@ -1,4 +1,4 @@
-.include "{= env.INSTALLROOT =}/etc/rspamd/rspamd.conf"
+.include "{= env.TESTDIR =}/../../conf/rspamd.conf"
 
 lua = "{= env.TESTDIR =}/lua/test_coverage.lua"
 
index a7693fb2a2c2103cb9589a04c081ce13bb1cce84..de4a188fbe53a39eec4d4ed2f6cfec7bf112e82e 100644 (file)
@@ -3,9 +3,6 @@ Library         Collections
 Library         OperatingSystem
 Library         Process
 
-*** Variables ***
-${SET_LOCAL_CONFDIR}  --var=LOCAL_CONFDIR=/no/no/no/
-
 *** Keywords ***
 Check Controller Errors
   @{result} =  HTTP  GET  ${RSPAMD_LOCAL_ADDR}  ${RSPAMD_PORT_CONTROLLER}  /errors
@@ -229,7 +226,17 @@ Run Rspamd
   Export Rspamd Variables To Environment
 
   # Dump templated config or errors to log
-  ${result} =  Run Process  ${RSPAMADM}  ${SET_LOCAL_CONFDIR}  configdump  -c  ${CONFIG}
+  ${result} =  Run Process  ${RSPAMADM}
+  ...  --var\=TMPDIR\=${RSPAMD_TMPDIR}
+  ...  --var\=DBDIR\=${RSPAMD_TMPDIR}
+  ...  --var\=LOCAL_CONFDIR\=/non-existent
+  ...  --var\=CONFDIR\=${RSPAMD_TESTDIR}/../../conf/
+  ...  configdump  -c  ${CONFIG}
+  ...  env:RSPAMD_LOCAL_CONFDIR=/non-existent
+  ...  env:RSPAMD_TMPDIR=${RSPAMD_TMPDIR}
+  ...  env:RSPAMD_CONFDIR=${RSPAMD_TESTDIR}/../../conf/
+  ...  env:LD_LIBRARY_PATH=${RSPAMD_TESTDIR}/../../contrib/aho-corasick
+  ...  env:ASAN_OPTIONS=quarantine_size_mb=2048:malloc_context_size=20:fast_unwind_on_malloc=0:log_path=${RSPAMD_TMPDIR}/rspamd-asan
   # We need to send output to files (or discard output) to avoid hanging Robot
   ...  stdout=${RSPAMD_TMPDIR}/configdump.stdout  stderr=${RSPAMD_TMPDIR}/configdump.stderr
   ${configdump} =  Run Keyword If  ${result.rc} == 0  Get File  ${RSPAMD_TMPDIR}/configdump.stdout
@@ -240,9 +247,17 @@ Run Rspamd
   Set Directory Ownership  ${RSPAMD_TMPDIR}  ${RSPAMD_USER}  ${RSPAMD_GROUP}
 
   # Run Rspamd
-  ${result} =  Run Process  ${RSPAMD}  ${SET_LOCAL_CONFDIR}  -u  ${RSPAMD_USER}  -g  ${RSPAMD_GROUP}
-  ...  -c  ${CONFIG}  env:TMPDIR=${RSPAMD_TMPDIR}  env:RSPAMD_DBDIR=${RSPAMD_TMPDIR}  env:DBDIR=${RSPAMD_TMPDIR}  env:LD_LIBRARY_PATH=${RSPAMD_TESTDIR}/../../contrib/aho-corasick
-  # We need to send output to files (or discard output) to avoid hanging Robot
+  ${result} =  Run Process  ${RSPAMD}  -u  ${RSPAMD_USER}  -g  ${RSPAMD_GROUP}
+  ...  -c  ${CONFIG}
+  ...  --var\=TMPDIR\=${RSPAMD_TMPDIR}
+  ...  --var\=DBDIR\=${RSPAMD_TMPDIR}
+  ...  --var\=LOCAL_CONFDIR\=/non-existent
+  ...  --var\=CONFDIR\=${RSPAMD_TESTDIR}/../../conf/
+  ...  env:RSPAMD_LOCAL_CONFDIR=/non-existent
+  ...  env:RSPAMD_TMPDIR=${RSPAMD_TMPDIR}
+  ...  env:RSPAMD_CONFDIR=${RSPAMD_TESTDIR}/../../conf/
+  ...  env:LD_LIBRARY_PATH=${RSPAMD_TESTDIR}/../../contrib/aho-corasick
+  ...  env:ASAN_OPTIONS=quarantine_size_mb=2048:malloc_context_size=20:fast_unwind_on_malloc=0:log_path=${RSPAMD_TMPDIR}/rspamd-asan
   ...  stdout=${RSPAMD_TMPDIR}/rspamd.stdout  stderr=${RSPAMD_TMPDIR}/rspamd.stderr
 
   # Log stdout/stderr