get_state process uptime in test_mode
Made changes to get_state() function to process uptime requests even when
test_mode is set to 1.
Change-Id: I5e2309996ae84ad31b736529adb8e48308edac9d
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/state.py b/lib/state.py
index 08b0c18..6c1c6d6 100755
--- a/lib/state.py
+++ b/lib/state.py
@@ -501,14 +501,10 @@
remote_cmd_buf = "read uptime filler 2>/dev/null < /proc/uptime" +\
" && [ ! -z \"${uptime}\" ] && echo ${uptime}"
cmd_buf = ["BMC Execute Command",
- re.sub('\\$', '\\$', remote_cmd_buf), 'quiet=1']
- if not quiet:
- # Get loc_test_mode parm for improved output on pissuing.
- # See sprint_issuing in gen_print.py for details.
- loc_test_mode = int(gp.get_var_value(var_name="test_mode",
- default=0))
- gp.print_issuing(cmd_buf, loc_test_mode)
- gp.print_issuing(remote_cmd_buf, loc_test_mode)
+ re.sub('\\$', '\\$', remote_cmd_buf), 'quiet=1',
+ 'test_mode=0']
+ gp.print_issuing(cmd_buf, 0)
+ gp.print_issuing(remote_cmd_buf, 0)
try:
stdout, stderr, rc =\
BuiltIn().wait_until_keyword_succeeds("10 sec", "0 sec",