mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-15 10:30:40 +01:00
Also now permit interactivly running tests without explicitly setting $srcdir. This now works if we are inside ./tests and fails, as before, when we are in a different directory. Detected by shellcheck via CodeFactor.io
28 lines
773 B
Bash
Executable File
28 lines
773 B
Bash
Executable File
#!/bin/bash
|
|
# we only test if the parameter is accepted - we cannot
|
|
# reliably deduce from the outside if it really worked.
|
|
# addd 2016-03-03 by RGerhards, released under ASL 2.0
|
|
echo \[glbl-unloadmodules\]:
|
|
. ${srcdir:=.}/diag.sh init
|
|
generate_conf
|
|
add_conf '
|
|
global(debug.unloadModules="off")
|
|
|
|
action(type="omfile" file=`echo $RSYSLOG_OUT_LOG`)
|
|
'
|
|
startup
|
|
sleep 1
|
|
shutdown_when_empty
|
|
wait_shutdown
|
|
# to check for support, we check if an error message has
|
|
# been recorded, which would bear the name of our option.
|
|
# if it is not recorded, we assume all is well. Not perfect,
|
|
# but works good enough.
|
|
grep -i "unloadModules" < $RSYSLOG_OUT_LOG
|
|
if [ ! $? -eq 1 ]; then
|
|
echo "parameter name in output, assuming error message:"
|
|
cat $RSYSLOG_OUT_LOG
|
|
exit 1
|
|
fi;
|
|
exit_test
|