Remove use of deprecated rprint functions
For each of the rprint functions, there is a corresponding gen_print function
that can be used instead.
Change-Id: I89c6e0b63cac7aee92da7dc7945e413001287967
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/extended/test_bmc_upload_stability.robot b/extended/test_bmc_upload_stability.robot
index d6f9a79..d090d51 100755
--- a/extended/test_bmc_upload_stability.robot
+++ b/extended/test_bmc_upload_stability.robot
@@ -46,7 +46,7 @@
Set Test Variable ${iteration} ${iteration + 1}
${loop_count}= Catenate Starting iteration: ${iteration}
- Rprintn
+ Printn
Rpvars loop_count
# Generate data file.
diff --git a/gui/__init__.robot b/gui/__init__.robot
index c92e0cc..795c638 100644
--- a/gui/__init__.robot
+++ b/gui/__init__.robot
@@ -20,7 +20,7 @@
[Documentation] Display initial info about the test cases.
Rpvars EXECDIR
- Rprint Timen OBMC_GUI Testing ==> [IN PROGRESS]
+ Print Timen OBMC_GUI Testing ==> [IN PROGRESS]
Print Dashes 0 100 1 =
Get OpenBMC System Info
diff --git a/gui/lib/resource.robot b/gui/lib/resource.robot
index 86b8fc6..b085be6 100644
--- a/gui/lib/resource.robot
+++ b/gui/lib/resource.robot
@@ -117,7 +117,7 @@
# Description of argument(s):
# obmc_test_setup The OpenBMC required state.
- Rprint Timen ${TEST NAME} ==> [STARTED]
+ Print Timen ${TEST NAME} ==> [STARTED]
Launch Browser And Login OpenBMC GUI
Log To Console Verifying the system state and stablity...
@@ -212,7 +212,7 @@
Test Teardown Execution
[Documentation] Do final closure activities of test case execution.
- Rprint Pgm Footer
+ Print Pgm Footer
Print Dashes 0 100 1 =
Close Browser
diff --git a/lib/boot_data.py b/lib/boot_data.py
index abb41b7..27ef3ea 100755
--- a/lib/boot_data.py
+++ b/lib/boot_data.py
@@ -18,7 +18,6 @@
import collections
import gen_print as gp
-import gen_robot_print as grp
import gen_valid as gv
import gen_misc as gm
import gen_cmd as gc
@@ -264,7 +263,7 @@
See sprint_report for details.
"""
- grp.rqprint(self.sprint_report(header_footer))
+ gp.qprint(self.sprint_report(header_footer))
def sprint_obj(self):
r"""
@@ -288,7 +287,7 @@
debug purposes.
"""
- grp.rprint(self.sprint_obj())
+ gp.gp_print(self.sprint_obj())
def create_boot_results_file_path(pgm_name,
diff --git a/lib/common_utils.robot b/lib/common_utils.robot
index 711dbf0..4e6595b 100755
--- a/lib/common_utils.robot
+++ b/lib/common_utils.robot
@@ -158,7 +158,7 @@
# quiet Indicates whether this keyword should write to console.
# print_string A string to be printed before checking the OS.
- rprint ${print_string}
+ Log To Console ${print_string} no_newline=True
# Attempt to ping the OS. Store the return code to check later.
${ping_rc}= Run Keyword and Return Status Ping Host ${os_host}
@@ -197,7 +197,7 @@
[Arguments] ${os_host}=${OS_HOST} ${os_username}=${OS_USERNAME}
... ${os_password}=${OS_PASSWORD} ${timeout}=${OS_WAIT_TIMEOUT}
... ${quiet}=${0}
- [Teardown] rprintn
+ [Teardown] Printn
# Description of argument(s):
# os_host The DNS name or IP of the OS host associated with our
@@ -213,15 +213,15 @@
${message}= Catenate Checking every ${interval} seconds for up to
... ${timeout} seconds for the operating system to communicate.
- rqprint_timen ${message}
+ Qprint Timen ${message}
Wait Until Keyword Succeeds ${timeout} sec ${interval} Check OS
... ${os_host} ${os_username} ${os_password}
... print_string=\#
- rqprintn
+ Qprintn
- rqprint_timen The operating system is now communicating.
+ Qprint Timen The operating system is now communicating.
Copy PNOR to BMC
@@ -289,7 +289,7 @@
${cmd}= Catenate which ssh_pw 2>/dev/null || find
... ${EXECDIR} -name 'ssh_pw'
- Rdpissuing ${cmd}
+ Dprint Issuing ${cmd}
${rc} ${output}= Run And Return Rc And Output ${cmd}
Rdpvars rc output
@@ -320,7 +320,7 @@
${ps_cmd}= Catenate ps axwwo user,pid,cmd
${cmd_buf}= Catenate echo $(${ps_cmd} | egrep '${search_string}' |
... egrep -v grep | cut -c10-14)
- Rdpissuing ${cmd_buf}
+ Dprint Issuing ${cmd_buf}
${rc} ${os_con_pid}= Run And Return Rc And Output ${cmd_buf}
Rdpvars os_con_pid
# If rc is not zero it just means that there is no OS Console process
@@ -361,7 +361,7 @@
${os_con_pid}= Get SOL Console Pid
${cmd_buf}= Catenate kill -9 ${os_con_pid}
- Run Keyword If '${os_con_pid}' != '${EMPTY}' Rdpissuing ${cmd_buf}
+ Run Keyword If '${os_con_pid}' != '${EMPTY}' Dprint Issuing ${cmd_buf}
${rc} ${output}= Run Keyword If '${os_con_pid}' != '${EMPTY}'
... Run And Return Rc And Output ${cmd_buf}
Run Keyword If '${os_con_pid}' != '${EMPTY}' Rdpvars rc output
@@ -411,7 +411,7 @@
# nohup detaches the process completely from our pty.
#${cmd_buf}= Catenate nohup ${sub_cmd_buf} &> ${log_file_path} &
${cmd_buf}= Catenate ${sub_cmd_buf} > ${log_file_path} 2>&1 &
- Rdpissuing ${cmd_buf}
+ Dprint Issuing ${cmd_buf}
${rc} ${output}= Run And Return Rc And Output ${cmd_buf}
# Because we are forking this command, we essentially will never get a
# non-zero return code or any output.
diff --git a/lib/dump_utils.robot b/lib/dump_utils.robot
index 30b5ef4..140338e 100644
--- a/lib/dump_utils.robot
+++ b/lib/dump_utils.robot
@@ -88,7 +88,7 @@
${exception}= Set Variable ${resp.json()['data']['exception']}
${at_capacity}= Set Variable Dump not captured due to a cap
${too_many_dumps}= Evaluate $at_capacity in $exception
- Rprintn
+ Printn
Rprint Vars exception too_many_dumps
# If there are too many dumps, return ${EMPTY}, otherwise Fail.
${status}= Run Keyword If ${too_many_dumps} Set Variable ${EMPTY}
diff --git a/lib/fan_utils.robot b/lib/fan_utils.robot
index d00e236..aa20e33 100755
--- a/lib/fan_utils.robot
+++ b/lib/fan_utils.robot
@@ -177,7 +177,7 @@
# For an air cooled system.
${min_fans_air}= Set Variable 3
- Rprintn
+ Printn
Rpvars num_fans water_cooled
# If water cooled must have at least min_fans_water fans, otherwise
diff --git a/lib/gen_cmd.py b/lib/gen_cmd.py
index 9483bb6..4d92771 100644
--- a/lib/gen_cmd.py
+++ b/lib/gen_cmd.py
@@ -20,7 +20,6 @@
robot_env = gp.robot_env
if robot_env:
- import gen_robot_print as grp
from robot.libraries.BuiltIn import BuiltIn
@@ -105,10 +104,7 @@
err_buf += line
if not print_output:
continue
- if robot_env:
- grp.rprint(line)
- else:
- sys.stdout.write(line)
+ gp.gp_print(line)
for line in sub_proc.stdout:
try:
out_buf += line
@@ -117,10 +113,7 @@
out_buf += line
if not print_output:
continue
- if robot_env:
- grp.rprint(line)
- else:
- sys.stdout.write(line)
+ gp.gp_print(line)
if print_output and not robot_env:
sys.stdout.flush()
sub_proc.communicate()
@@ -132,10 +125,7 @@
err_msg += "out_buf:\n" + out_buf
if show_err:
- if robot_env:
- grp.rprint_error_report(err_msg)
- else:
- gp.print_error_report(err_msg)
+ gp.print_error_report(err_msg)
if not ignore_err:
if robot_env:
BuiltIn().fail(err_msg)
@@ -468,10 +458,7 @@
err_msg += "err_buf:\n" + err_buf
err_msg += "out_buf:\n" + out_buf
if show_err:
- if robot_env:
- func_stdout += grp.sprint_error_report(err_msg)
- else:
- func_stdout += gp.sprint_error_report(err_msg)
+ func_stdout += gp.sprint_error_report(err_msg)
func_history_stdout += func_stdout
if attempt_num < max_attempts:
func_history_stdout += gp.sprint_issuing("time.sleep("
@@ -482,11 +469,7 @@
if shell_rc not in allowed_shell_rcs:
func_stdout = func_history_stdout
- if robot_env:
- grp.rprint(func_stdout)
- else:
- sys.stdout.write(func_stdout)
- sys.stdout.flush()
+ gp.gp_print(func_stdout)
if shell_rc not in allowed_shell_rcs:
if not ignore_err:
diff --git a/lib/gen_robot_valid.py b/lib/gen_robot_valid.py
index c69b8a4..06d87be 100755
--- a/lib/gen_robot_valid.py
+++ b/lib/gen_robot_valid.py
@@ -4,7 +4,7 @@
This file contains functions useful for validating variables in robot.
"""
-import gen_robot_print as grp
+import gen_print as gp
import gen_valid as gv
from robot.libraries.BuiltIn import BuiltIn
@@ -17,7 +17,7 @@
r"""
Validate a robot value.
- This function is the robot wrapper for gen_robot_print.svalid_value.
+ This function is the robot wrapper for gen_valid.svalid_value.
Description of arguments:
var_name The name of the variable whose value is to
@@ -94,7 +94,7 @@
error_message = gv.svalid_value(var_value, invalid_values,
valid_values, var_name)
if not error_message == "":
- error_message = grp.sprint_error_report(error_message)
+ error_message = gp.sprint_error_report(error_message)
BuiltIn().fail(error_message)
@@ -102,7 +102,7 @@
r"""
Validate a robot integer.
- This function is the robot wrapper for gen_robot_print.svalid_integer.
+ This function is the robot wrapper for gen_valid.svalid_integer.
Description of arguments:
var_name The name of the variable whose value is to
@@ -143,7 +143,7 @@
else:
error_message = gv.svalid_integer(var_value, var_name)
if not error_message == "":
- error_message = grp.sprint_error_report(error_message)
+ error_message = gp.sprint_error_report(error_message)
BuiltIn().fail(error_message)
@@ -152,7 +152,7 @@
r"""
Validate that a robot integer is within the given range.
- This function is the robot wrapper for gen_robot_print.svalid_range.
+ This function is the robot wrapper for gen_valid.svalid_range.
Description of arguments:
var_name The name of the variable whose value is to
@@ -196,5 +196,5 @@
range = [x for x in range if x]
error_message = gv.svalid_range(var_value, range, var_name)
if not error_message == "":
- error_message = grp.sprint_error_report(error_message)
+ error_message = gp.sprint_error_report(error_message)
BuiltIn().fail(error_message)
diff --git a/lib/obmc_boot_test.py b/lib/obmc_boot_test.py
index 8acc4e4..a575d79 100755
--- a/lib/obmc_boot_test.py
+++ b/lib/obmc_boot_test.py
@@ -22,7 +22,6 @@
from boot_data import *
import gen_print as gp
-import gen_robot_print as grp
import gen_robot_plug_in as grpi
import gen_robot_valid as grv
import gen_misc as gm
@@ -403,7 +402,7 @@
validate_parms()
- grp.rqprint_pgm_header()
+ gp.qprint_pgm_header()
grk.run_key("Set BMC Power Policy ALWAYS_POWER_OFF")
@@ -414,7 +413,7 @@
call_point='setup')
if rc != 0:
error_message = "Plug-in setup failed.\n"
- grp.rprint_error_report(error_message)
+ gp.print_error_report(error_message)
BuiltIn().fail(error_message)
# Setting cp_setup_called lets our Teardown know that it needs to call
# the cleanup plug-in call point.
@@ -641,7 +640,7 @@
gp.qprintn("Last 10 boots:\n")
for boot_entry in last_ten:
- grp.rqprint(boot_entry)
+ gp.qprint(boot_entry)
gp.qprint_dashes(0, 90)
@@ -1021,7 +1020,7 @@
"A keyword timeout occurred ending this program.\n"]
BuiltIn().run_keyword_if_timeout_occurred(*cmd_buf)
- grp.rqprint_pgm_footer()
+ gp.qprint_pgm_footer()
def post_stack():
diff --git a/network/test_cable_pull_recover.robot b/network/test_cable_pull_recover.robot
index a039f64..776b981 100644
--- a/network/test_cable_pull_recover.robot
+++ b/network/test_cable_pull_recover.robot
@@ -32,7 +32,7 @@
... shutdown from the switch port.
[Tags] Verify_Network_Interface_Recovery
- Rprintn
+ Printn
Set Switch Port State DOWN
Set Switch Port State UP
diff --git a/network/test_host_network_interfaces.robot b/network/test_host_network_interfaces.robot
index 8045de2..715cd2a 100644
--- a/network/test_host_network_interfaces.robot
+++ b/network/test_host_network_interfaces.robot
@@ -21,7 +21,7 @@
[Documentation] Verify the states of all system interfaces.
[Tags] Verify_Network_Interfaces
- Rprintn
+ Printn
REST Power On
@{interface_names}= Get OS Network Interface Names
:FOR ${interface_name} IN @{interface_names}
diff --git a/openpower/tests_openbmctool/test_openbmctool.robot b/openpower/tests_openbmctool/test_openbmctool.robot
index 260477a..84b5cf9 100755
--- a/openpower/tests_openbmctool/test_openbmctool.robot
+++ b/openpower/tests_openbmctool/test_openbmctool.robot
@@ -42,7 +42,7 @@
Suite Setup Suite Setup Execution
-Test Setup Rprintn
+Test Setup Printn
*** Variables ***
@@ -281,7 +281,7 @@
# Verify can find the openbmctool.
${openbmctool_file_path}= which openbmctool.py
- Rprintn
+ Printn
Rprint Vars openbmctool_file_path
# Get the version number from openbmctool.
diff --git a/redfish/service_root/test_service_root.robot b/redfish/service_root/test_service_root.robot
index 3d3ce57..51bc561 100644
--- a/redfish/service_root/test_service_root.robot
+++ b/redfish/service_root/test_service_root.robot
@@ -7,7 +7,7 @@
Test Teardown FFDC On Test Case Fail
-Test Setup Rprintn
+Test Setup Printn
*** Test Cases ***
diff --git a/redfish/service_root/test_service_root_security.robot b/redfish/service_root/test_service_root_security.robot
index a2090c6..9262aaf 100644
--- a/redfish/service_root/test_service_root_security.robot
+++ b/redfish/service_root/test_service_root_security.robot
@@ -6,7 +6,7 @@
Resource ../../lib/openbmc_ffdc.robot
Test Teardown FFDC On Test Case Fail
-Test Setup Rprintn
+Test Setup Printn
*** Variables ***
diff --git a/systest/adapter_ucode_update.robot b/systest/adapter_ucode_update.robot
index df14de6..b54bca4 100644
--- a/systest/adapter_ucode_update.robot
+++ b/systest/adapter_ucode_update.robot
@@ -34,7 +34,7 @@
[Documentation] Load and activate firmware on the given adapters.
[Tags] Load_And_Activate_uCode_On_Adapters
- Rprintn
+ Printn
# Format parms.
# Ensure that nvme (pci-e storage utility) tool exists.
${device_names}= Split String ${DEVICE_NAMES} ,
@@ -103,4 +103,4 @@
... wget ${ADAPTER_UCODE_URL}
${image_dir_path_url} ${image_file_name}=
... Split Path ${ADAPTER_UCODE_URL}
- Set Global Variable ${image_file_name}
\ No newline at end of file
+ Set Global Variable ${image_file_name}
diff --git a/systest/gpu_stress_test.robot b/systest/gpu_stress_test.robot
index a384150..17e11c4 100755
--- a/systest/gpu_stress_test.robot
+++ b/systest/gpu_stress_test.robot
@@ -49,7 +49,7 @@
... Fail msg=${failmsg01}
# Show parameters for HTX stress test.
- Rprintn
+ Printn
Rpvars HTX_DURATION HTX_LOOP HTX_INTERVAL
# Set the iteration (loop) counter.
@@ -78,7 +78,7 @@
Set Suite Variable ${iteration} ${iteration + 1}
${loop_count}= Catenate Starting iteration: ${iteration}
- Rprintn
+ Printn
Rpvars loop_count
REST Power On stack_mode=skip
@@ -107,7 +107,7 @@
${temperature}= Get GPU Max Temperature
${temperature_via_rest}= Get GPU Temperature Via REST
${clock}= Get GPU Clock
- Rprintn
+ Printn
Rpvars power power_max temperature temperature_via_rest
... temperature_max clock clock_max
@@ -137,10 +137,10 @@
Flush REST Sessions
- Rprint Timen HTX Test ran for: ${HTX_DURATION}
+ Print Timen HTX Test ran for: ${HTX_DURATION}
${loop_count}= Catenate Ending iteration: ${iteration}
- Rprintn
+ Printn
Rpvars loop_count
@@ -165,7 +165,7 @@
# Get number of GPUs reported by the OS.
${cmd}= Catenate lspci | grep NVIDIA | wc -l
${num_os_gpus} ${stderr} ${rc}= OS Execute Command ${cmd}
- Rprintn
+ Printn
Rpvars num_os_gpus
# If no GPUs detected, we cannot continue.
diff --git a/systest/htx_hardbootme_test.robot b/systest/htx_hardbootme_test.robot
index 2ce02ce..34883d2 100755
--- a/systest/htx_hardbootme_test.robot
+++ b/systest/htx_hardbootme_test.robot
@@ -67,7 +67,7 @@
[Documentation] Stress the system using HTX exerciser.
[Tags] Hard_Bootme_Test
- Rprintn
+ Printn
Rpvars HTX_DURATION HTX_LOOP HTX_INTERVAL CHECK_INVENTORY
... INV_IGNORE_LIST PREV_INV_FILE_PATH
@@ -117,7 +117,7 @@
${loop_count}= Catenate Starting iteration: ${iteration}
${estimated_time_remaining}= Convert Time
... ${est_seconds_left} result_format=compact
- Rprintn
+ Printn
Rpvars loop_count estimated_loop_time estimated_time_remaining
REST Power On stack_mode=skip
@@ -149,7 +149,7 @@
Close All Connections
Flush REST Sessions
- Rprint Timen HTX Test ran for: ${HTX_DURATION}
+ Print Timen HTX Test ran for: ${HTX_DURATION}
${loop_count}= Catenate Ending iteration: ${iteration}
@@ -187,7 +187,7 @@
... ${file2} ${json_diff_file_path} ${INV_IGNORE_LIST}
Run Keyword If '${diff_rc}' != '${0}'
... Report Inventory Mismatch ${diff_rc} ${json_diff_file_path}
- ... ELSE Rprint Timen Inventoy check: No differences found.
+ ... ELSE Print Timen Inventoy check: No differences found.
Report Inventory Mismatch
@@ -230,7 +230,7 @@
${bmc_version} ${stderr} ${rc}= BMC Execute Command
... cat /etc/os-release
- Rprintn
+ Printn
Rpvars bmc_version
${pnor_version}= Get Host Software Objects Details
diff --git a/systest/io_storage_compability.robot b/systest/io_storage_compability.robot
index 2b95c70..e62c14f 100644
--- a/systest/io_storage_compability.robot
+++ b/systest/io_storage_compability.robot
@@ -29,7 +29,7 @@
[Tags] IO_Storage_Compatibility_Stress
Run MDT Profile
- Rprint Timen Running HTX. Please wait.
+ Print Timen Running HTX. Please wait.
Repeat Keyword ${LOOP_COUNT} times
... Run Keywords
... Set Suite Variable ${ITERATION} ${ITERATION +1}
diff --git a/systest/network_stability_test.robot b/systest/network_stability_test.robot
index 5194a71..bf1dfdd 100755
--- a/systest/network_stability_test.robot
+++ b/systest/network_stability_test.robot
@@ -54,7 +54,7 @@
Shutdown HTX Exerciser
- Rprint Timen HTX Test ran for: ${HTX_DURATION}
+ Print Timen HTX Test ran for: ${HTX_DURATION}
Start Network Test
diff --git a/systest/proc_freq_check.robot b/systest/proc_freq_check.robot
index 69d14ee..d37e9f8 100755
--- a/systest/proc_freq_check.robot
+++ b/systest/proc_freq_check.robot
@@ -24,7 +24,7 @@
${actual_min_freq}= Get CPU Min Frequency
${min_freq_designated_lower_limit}= Get CPU Min Frequency Limit
- Rprintn
+ Printn
Rpvars actual_min_freq min_freq_designated_lower_limit
${err_msg}= Catenate Reported CPU frequency below designated limit.
diff --git a/systest/proc_turbo_freq_check.robot b/systest/proc_turbo_freq_check.robot
index 8f140e3..30c9247 100755
--- a/systest/proc_turbo_freq_check.robot
+++ b/systest/proc_turbo_freq_check.robot
@@ -41,7 +41,7 @@
REST Power On stack_mode=normal
${proc_speed_turbo}= Get CPU Max Frequency
- Rprintn
+ Printn
Rpvars proc_speed_non_turbo proc_speed_turbo
${err_msg}= Catenate Reported turbo processor speed should be
diff --git a/tests/test_fans_os.robot b/tests/test_fans_os.robot
index b0546d5..3d04a2c 100755
--- a/tests/test_fans_os.robot
+++ b/tests/test_fans_os.robot
@@ -157,7 +157,7 @@
# back to normal.
${msg}= Catenate Waiting ${minutes_to_stabilize} minutes
... for fan daemon to stabilize fans.
- Rprint Timen ${msg}
+ Print Timen ${msg}
Run Key U Sleep \ ${minutes_to_stabilize}m
diff --git a/tests/test_inventory.robot b/tests/test_inventory.robot
index eff05c1..d5c2a32 100644
--- a/tests/test_inventory.robot
+++ b/tests/test_inventory.robot
@@ -290,7 +290,7 @@
${system_list}= Get Endpoint Paths
... ${HOST_INVENTORY_URI}system/chassis/motherboard fan*
- Rprintn
+ Printn
Rprint Vars water_cooled system_list
Run Keyword If ${water_cooled}