mirror of
https://github.com/schoebel/mars
synced 2025-01-01 11:52:25 +00:00
test_suite: refactoring
This commit is contained in:
parent
54275af543
commit
deb007c379
@ -73,7 +73,7 @@ function lib_wait_until_fetch_stops
|
||||
|
||||
for var in maxtime_fetch time_constant_fetch; do
|
||||
eval $var='$'${module}_${var}
|
||||
eval v='$'$var
|
||||
eval v=${!var}
|
||||
if [ -z "$v" ]; then
|
||||
lib_exit 1 "variable $var not set"
|
||||
fi
|
||||
|
@ -67,7 +67,7 @@ function net_do_impact_cmd
|
||||
fi
|
||||
for var in pattern replace; do
|
||||
local x
|
||||
eval x='$'$var
|
||||
x=${!var}
|
||||
if [ -z "$x" ]; then
|
||||
lib_exit 1 "cannot determine $var in replace_expression $replace_expression"
|
||||
fi
|
||||
|
@ -124,12 +124,12 @@ function syslog_set_logging_parameters
|
||||
for param in class limit recovery_s; do
|
||||
varname='syslog_flood_'$param
|
||||
lib_vmsg " setting $varname on $host"
|
||||
eval value='$'$varname
|
||||
value=${!varname}
|
||||
if [ -z "$value" ]; then
|
||||
lib_exit 1 "no value found for variable $varname"
|
||||
fi
|
||||
filename='syslog_flood_'$param'_file'
|
||||
eval file='$'$filename
|
||||
file=${!filename}
|
||||
lib_remote_idfile $host "ls -l $file" || lib_exit 1
|
||||
lib_remote_idfile $host "echo $value > $file" || lib_exit 1
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user