Enforced robotframework standards.
- The standards are enforced using the rflint static anylysis tool.
- More standards will be added in future commits but this is a base
starting point.
Change-Id: I7dd8a2b0b42a51327b748cb730609d7ee2538de3
Signed-off-by: Joy Onyerikwu <onyekachukwu.joy.onyerikwu@ibm.com>
diff --git a/extended/code_update/code_update_utils.robot b/extended/code_update/code_update_utils.robot
index f8d030c..96f0378 100755
--- a/extended/code_update/code_update_utils.robot
+++ b/extended/code_update/code_update_utils.robot
@@ -101,6 +101,7 @@
Check If File Exist
+ [Documentation] Verify that the file exists on this machine.
[Arguments] ${filepath}
Log \n PATH: ${filepath}
OperatingSystem.File Should Exist ${filepath}
@@ -110,6 +111,7 @@
System Readiness Test
+ [Documentation] Verify that the system can be pinged and authenticated through REST.
${l_status}= Run Keyword and Return Status
... Verify Ping and REST Authentication
Run Keyword If '${l_status}' == '${False}'
diff --git a/extended/code_update/test_image_upload.robot b/extended/code_update/test_image_upload.robot
index 28c903f..2fc615f 100644
--- a/extended/code_update/test_image_upload.robot
+++ b/extended/code_update/test_image_upload.robot
@@ -169,6 +169,7 @@
Upload Post Request
+ [Documentation] Make POST request.
[Arguments] ${uri} ${timeout}=10 ${quiet}=${QUIET} &{kwargs}
# Description of argument(s):
diff --git a/extended/full_suite_regression.robot b/extended/full_suite_regression.robot
index 04f55d6..b767c1c 100755
--- a/extended/full_suite_regression.robot
+++ b/extended/full_suite_regression.robot
@@ -81,6 +81,4 @@
${output}=
... Run wkhtmltopdf ./${combined_report_html_file_path} ./${combined_report_pdf_file_path}
Should Not Be Empty ${output}
- OperatingSystem.File Should Exist ${combined_report_pdf_file_path}
-
-
+ OperatingSystem.File Should Exist ${combined_report_pdf_file_path}
\ No newline at end of file
diff --git a/extended/obmc_boot_test_resource.robot b/extended/obmc_boot_test_resource.robot
index a9b0052..49e74e1 100644
--- a/extended/obmc_boot_test_resource.robot
+++ b/extended/obmc_boot_test_resource.robot
@@ -69,6 +69,7 @@
*** Keywords ***
OBMC Boot Test
+ [Documentation] Run the OBMC boot test.
[Teardown] OBMC Boot Test Teardown
[Arguments] ${pos_arg1}=${EMPTY} &{arguments}
diff --git a/extended/run_keyword.robot b/extended/run_keyword.robot
index 96ff3d9..31253c7 100644
--- a/extended/run_keyword.robot
+++ b/extended/run_keyword.robot
@@ -22,9 +22,12 @@
# cd $HOME/git/openbmc-test-automation
# export PYTHONPATH=${HOME}/git/openbmc-test-automation/lib/
-# robot --outputdir=/tmp -v OPENBMC_HOST:barp01 -v 'keyword_string:Log To Console Hi.' extended/run_keyword.robot
+# robot --outputdir=/tmp -v OPENBMC_HOST:barp01 -v 'keyword_string:Log To Console Hi.'
+# extended/run_keyword.robot
-# robot --outputdir=/tmp -v OPENBMC_HOST:barp01 -v 'keyword_string:${state}= Get State quiet=${1} ; Rpvar state' -v lib_file_path:state.py extended/run_keyword.robot
+# robot --outputdir=/tmp -v OPENBMC_HOST:barp01
+# -v 'keyword_string:${state}= Get State quiet=${1} ; Rpvar state'
+# -v lib_file_path:state.py extended/run_keyword.robot
# NOTE: Robot searches PYTHONPATH for libraries.
Library run_keyword.py
@@ -48,10 +51,12 @@
*** Test Cases ***
Run Keyword Pgm
+ [Documentation] Run the keyword program.
Main
*** Keywords ***
Main
+ [Documentation] Do main program processing.
[Teardown] Program Teardown
Main Py
diff --git a/extended/standby_bmc.robot b/extended/standby_bmc.robot
index b85110c..0de48e0 100644
--- a/extended/standby_bmc.robot
+++ b/extended/standby_bmc.robot
@@ -103,7 +103,7 @@
Powercycle System Via PDU
- [Documentation] AC cycle the system via PDU
+ [Documentation] AC cycle the system via PDU.
Validate Parameters
PDU Power Cycle
@@ -111,6 +111,7 @@
Validate Parameters
+ [Documentation] Validate PDU parameters.
Should Not Be Empty ${PDU_IP}
Should Not Be Empty ${PDU_TYPE}
Should Not Be Empty ${PDU_SLOT_NO}
diff --git a/extended/test_ac_cycles.robot b/extended/test_ac_cycles.robot
index 9ff1295..8b02797 100644
--- a/extended/test_ac_cycles.robot
+++ b/extended/test_ac_cycles.robot
@@ -16,6 +16,7 @@
*** Test Cases ***
Test OpenBMC Buster
+ [Documentation] Test the OpenBMC buster.
Validate Parameters
${output}= Execute Command
... find /var/lib -type f |xargs -n 1 touch
@@ -32,6 +33,7 @@
*** Keywords ***
Validate Parameters
+ [Documentation] Validate the PDU parameters.
Should Not Be Empty ${PDU_IP}
Should Not Be Empty ${PDU_TYPE}
Should Not Be Empty ${PDU_SLOT_NO}
diff --git a/extended/test_esel.robot b/extended/test_esel.robot
index 1a2178b..4b3695c 100644
--- a/extended/test_esel.robot
+++ b/extended/test_esel.robot
@@ -128,7 +128,8 @@
${rev_id_ls}= Get Substring ${rev_id_1} 1 3
${rev_id_ms}= Get Substring ${rev_id_1} -2
Run Inband IPMI Raw Command 0x0a 0x42
- ${output}= Check IPMI OEMpartialadd Reject 0x3a 0xf0 0x${rev_id_ls} 0x${rev_id_ms} 0 0 0 0 0 1 2 3 4 5 6 7 8 9 0xa 0xb 0xc 0xd 0xe 0xf
+ ${output}= Check IPMI OEMpartialadd Reject
+ ... 0x3a 0xf0 0x${rev_id_ls} 0x${rev_id_ms} 0 0 0 0 0 1 2 3 4 5 6 7 8 9 0xa 0xb 0xc 0xd 0xe 0xf
Should Contain ${output} Reservation cancelled
Test Correct Reservation_ID
@@ -142,7 +143,8 @@
${rev_id_2}= Run Inband IPMI Raw Command 0x0a 0x42
${rev_id_ls}= Get Substring ${rev_id_2} 1 3
${rev_id_ms}= Get Substring ${rev_id_2} -2
- ${output}= Check IPMI OEMpartialadd Accept 0x3a 0xf0 0x${rev_id_ls} 0x${rev_id_ms} 0 0 0 0 0 1 2 3 4 5 6 7 8 9 0xa 0xb 0xc 0xd 0xe 0xf
+ ${output}= Check IPMI OEMpartialadd Accept
+ ... 0x3a 0xf0 0x${rev_id_ls} 0x${rev_id_ms} 0 0 0 0 0 1 2 3 4 5 6 7 8 9 0xa 0xb 0xc 0xd 0xe 0xf
Should Be Empty ${output}
*** Keywords ***
@@ -197,18 +199,23 @@
Sleep 10s reason=Wait for service to restart properly.
+
Run IPMI Command Returned
+ [Documentation] Run the IPMI command and return the output.
[Arguments] ${args}
${output_1}= Execute Command /tmp/ipmitool -I dbus raw ${args}
[Return] ${output_1}
+
Check IPMI OEMpartialadd Reject
+ [Documentation] Check if IPMI rejects the OEM partial add command.
[Arguments] ${args}
Login To OS Host ${OS_HOST} ${OS_USERNAME} ${OS_PASSWORD}
${stdout} ${stderr} ${output_2}= Execute Command ipmitool raw ${args}
... return_stdout=True return_stderr=True return_rc=True
[Return] ${stderr}
+
Suite Setup Execution
[Documentation] Validates input parameters & check if HOST OS is up.
@@ -225,11 +232,12 @@
Login To OS Host ${OS_HOST} ${OS_USERNAME} ${OS_PASSWORD}
Open Connection And Log In
+
Check IPMI OEMpartialadd Accept
+ [Documentation] Check if IPMI accepts the OEM partial add command.
[Arguments] ${args}
Login To OS Host ${OS_HOST} ${OS_USERNAME} ${OS_PASSWORD}
${stdout} ${stderr} ${output_3}= Execute Command ipmitool raw ${args}
... return_stdout=True return_stderr=True return_rc=True
Should Be Equal ${output_3} ${0} msg=${stderr}
- [Return] ${stderr}
-
+ [Return] ${stderr}
\ No newline at end of file
diff --git a/gui/obmc_gui/lib/resource.robot b/gui/obmc_gui/lib/resource.robot
index 9c901b0..088f645 100644
--- a/gui/obmc_gui/lib/resource.robot
+++ b/gui/obmc_gui/lib/resource.robot
@@ -271,8 +271,10 @@
# confirmation Server power operations confirmation
# (e.g. yes.)
- Click Element
- ... //*[@id='power-operations']/div[${main_element}]/div[${sub_element}]/confirm/div/div[${confirm_msg_elt}]/button[${confirmation}]
+ ${element_path}= Catenate //*[@id='power-operations']/div[${main_element}]/div[${sub_element}]
+ ... /confirm/div/div[${confirm_msg_elt}]/button[${confirmation}]
+ Click Element ${element_path.replace(" ","")}
+
GUI Power On
[Documentation] Power on the host using GUI.
diff --git a/gui/obmc_gui/test/gui_header/test_obmc_gui_power_operations.robot b/gui/obmc_gui/test/gui_header/test_obmc_gui_power_operations.robot
index d6b4296..64f3806 100644
--- a/gui/obmc_gui/test/gui_header/test_obmc_gui_power_operations.robot
+++ b/gui/obmc_gui/test/gui_header/test_obmc_gui_power_operations.robot
@@ -130,10 +130,7 @@
*** Keywords ***
Login OpenBMC GUI with failure enable
+ [Documentation] Login to the OpenBMC GUI with failure enabled.
Open Browser With URL ${xpath_openbmc_url}
- Login OpenBMC GUI ${OPENBMC_USERNAME} ${OPENBMC_PASSWORD}
-
-
-
-
+ Login OpenBMC GUI ${OPENBMC_USERNAME} ${OPENBMC_PASSWORD}
\ No newline at end of file
diff --git a/lib/connection_client.robot b/lib/connection_client.robot
index 527cea1..4cd2088 100755
--- a/lib/connection_client.robot
+++ b/lib/connection_client.robot
@@ -54,6 +54,7 @@
SSHLibrary.Login ${username} ${password}
Open Connection for SCP
+ [Documentation] Open a connection for SCP.
Import Library SCPLibrary WITH NAME scp
Run Keyword If '${SSH_PORT}' == '${EMPTY}' scp.Open connection ${OPENBMC_HOST}
... username=${OPENBMC_USERNAME} password=${OPENBMC_PASSWORD}
diff --git a/lib/ipmi_client.robot b/lib/ipmi_client.robot
index 591919c..9d8a93c 100755
--- a/lib/ipmi_client.robot
+++ b/lib/ipmi_client.robot
@@ -24,6 +24,7 @@
*** Keywords ***
Run IPMI Command
+ [Documentation] Run the given IPMI command.
[Arguments] ${args}
${resp}= Run Keyword If '${IPMI_COMMAND}' == 'External'
... Run External IPMI RAW Command ${args}
@@ -35,6 +36,7 @@
[Return] ${resp}
Run IPMI Standard Command
+ [Documentation] Run the standard IPMI command.
[Arguments] ${args}
${resp}= Run Keyword If '${IPMI_COMMAND}' == 'External'
... Run External IPMI Standard Command ${args}
@@ -47,6 +49,7 @@
[Return] ${resp}
Run Dbus IPMI RAW Command
+ [Documentation] Run the raw IPMI command through dbus.
[Arguments] ${args}
${valueinBytes}= Byte Conversion ${args}
${cmd}= Catenate ${dbushostipmicmd1} ${dbusHostIpmiCmdReceivedMsg}
@@ -56,6 +59,7 @@
set test variable ${OUTPUT} "${output}"
Run Dbus IPMI Standard Command
+ [Documentation] Run the standard IPMI command through dbus.
[Arguments] ${args}
Copy ipmitool
${stdout} ${stderr} ${output}= Execute Command
@@ -65,7 +69,7 @@
[Return] ${stdout}
Run Inband IPMI Raw Command
- [Documentation] Run Inband IPMI raw command.
+ [Documentation] Run the raw IPMI command in-band.
[Arguments] ${args} ${os_host}=${OS_HOST} ${os_username}=${OS_USERNAME}
... ${os_password}=${OS_PASSWORD}
@@ -84,7 +88,7 @@
[Return] ${stdout}
Run Inband IPMI Standard Command
- [Documentation] Run Inband IPMI standard command.
+ [Documentation] Run the standard IPMI command in-band.
[Arguments] ${args} ${os_host}=${OS_HOST} ${os_username}=${OS_USERNAME}
... ${os_password}=${OS_PASSWORD}
@@ -103,6 +107,7 @@
[Return] ${stdout}
Run External IPMI RAW Command
+ [Documentation] Run the raw IPMI command externally.
[Arguments] ${args}
${ipmi_raw_cmd}= Catenate SEPARATOR=
... ${IPMI_EXT_CMD} -P${SPACE}${IPMI_PASSWORD}${SPACE}
@@ -112,6 +117,7 @@
[Return] ${output}
Run External IPMI Standard Command
+ [Documentation] Run the standard IPMI command in-band.
[Arguments] ${args} ${fail_on_err}=${1}
# Description of argument(s):
@@ -220,23 +226,31 @@
Set NetFn Byte
- [Arguments] ${word}
- ${netfnByteLocal}= Catenate byte:${word}
- Set Global Variable ${netfnByte} ${netfnByteLocal}
+ [Documentation] Set the network function byte.
+ [Arguments] ${word}
+ ${netfnByteLocal}= Catenate byte:${word}
+ Set Global Variable ${netfnByte} ${netfnByteLocal}
Set Cmd Byte
- [Arguments] ${word}
- ${cmdByteLocal}= Catenate byte:${word}
- Set Global Variable ${cmdByte} ${cmdByteLocal}
+ [Documentation] Set the command byte.
+ [Arguments] ${word}
+ ${cmdByteLocal}= Catenate byte:${word}
+ Set Global Variable ${cmdByte} ${cmdByteLocal}
Set Array Byte
- [Arguments] ${word}
- ${arrayByteLocal}= Catenate SEPARATOR= ${arrayByte} ${word}
- ${arrayByteLocal}= Catenate SEPARATOR= ${arrayByteLocal} ,
- Set Global Variable ${arrayByte} ${arrayByteLocal}
+ [Documentation] Set the array byte.
+ [Arguments] ${word}
+ ${arrayByteLocal}= Catenate SEPARATOR= ${arrayByte} ${word}
+ ${arrayByteLocal}= Catenate SEPARATOR= ${arrayByteLocal} ,
+ Set Global Variable ${arrayByte} ${arrayByteLocal}
Copy ipmitool
- OperatingSystem.File Should Exist tools/ipmitool msg=The ipmitool program could not be found in the tools directory. It is not part of the automation code by default. You must manually copy or link the correct openbmc version of the tool in to the tools directory in order to run this test suite.
+ [Documentation] Copy the ipmitool to the BMC.
+ ${ipmitool_error}= Catenate The ipmitool program could not be found in the tools directory.
+ ... It is not part of the automation code by default. You must manually copy or link the correct openbmc
+ ... version of the tool in to the tools directory in order to run this test suite.
+
+ OperatingSystem.File Should Exist tools/ipmitool msg=${ipmitool_error}
Import Library SCPLibrary WITH NAME scp
scp.Open connection ${OPENBMC_HOST} username=${OPENBMC_USERNAME} password=${OPENBMC_PASSWORD}
diff --git a/lib/pdu/pdu.robot b/lib/pdu/pdu.robot
index 111952e..aa1b216 100644
--- a/lib/pdu/pdu.robot
+++ b/lib/pdu/pdu.robot
@@ -1,15 +1,17 @@
*** Settings ***
-Documentation Generic PDU library
+Documentation Generic Protocol Distribution Unit (PDU) library
Resource ../../lib/resource.txt
*** Keywords ***
Validate Prereq
+ [Documentation] Validate prerequisites for PDU.
${PDU_VAR_LIST} = Create List PDU_TYPE PDU_IP PDU_USERNAME PDU_PASSWORD PDU_SLOT_NO
: FOR ${PDU_VAR} IN @{PDU_VAR_LIST}
\ Should Not Be Empty ${${PDU_VAR}} msg=Unable to find variable ${PDU_VAR}
PDU Power Cycle
+ [Documentation] Perform PDU power cycle.
Validate Prereq
Import Resource ${CURDIR}/../../lib/pdu/${PDU_TYPE}.robot
Power Cycle
diff --git a/lib/pdu/synaccess.robot b/lib/pdu/synaccess.robot
index ff71089..d9d5a21 100644
--- a/lib/pdu/synaccess.robot
+++ b/lib/pdu/synaccess.robot
@@ -1,17 +1,19 @@
*** Settings ***
-Documentation synaccess PDU library
+Documentation Synaccess Protocol Distribution Unit (PDU) library
Resource ../../lib/pdu/pdu.robot
Library RequestsLibrary.RequestsKeywords
*** Keywords ***
Connect and Login
+ [Documentation] Open PDU connection and login.
Validate Prereq
SSHLibrary.Open Connection ${PDU_IP}
${auth}= Create List ${PDU_USERNAME} ${PDU_PASSWORD}
Create Session pdu http://${PDU_IP} auth=${auth}
Power Cycle
+ [Documentation] Perform PDU power cycle.
Connect and Login
${ret}= Get Request pdu /cmd.cgi?$A4 ${PDU_SLOT_NO}
${error_message}= Catenate Power cycle of slot ${PDU_SLOT_NO} failed.
diff --git a/lib/resource.txt b/lib/resource.txt
index 48ab60e..9e2f430 100755
--- a/lib/resource.txt
+++ b/lib/resource.txt
@@ -82,13 +82,16 @@
*** Keywords ***
Get Inventory Schema
+ [Documentation] Get inventory schema.
[Arguments] ${machine}
[Return] &{INVENTORY}[${machine}]
Get Inventory Items Schema
+ [Documentation] Get inventory items schema.
[Arguments] ${machine}
[Return] &{INVENTORY_ITEMS}[${machine}]
Get Sensor Schema
+ [Documentation] Get sensors schema.
[Arguments] ${machine}
[Return] &{SENSORS}[${machine}]
diff --git a/lib/state_manager.robot b/lib/state_manager.robot
index e54cbb3..75b1048 100755
--- a/lib/state_manager.robot
+++ b/lib/state_manager.robot
@@ -304,6 +304,4 @@
Wait For BMC Ready
[Documentation] Check BMC state and wait for BMC Ready.
- Wait Until Keyword Succeeds 10 min 10 sec Is BMC Ready
-
-
+ Wait Until Keyword Succeeds 10 min 10 sec Is BMC Ready
\ No newline at end of file
diff --git a/lib/utils.robot b/lib/utils.robot
index b333aea..b782ec1 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -111,6 +111,7 @@
Wait For Host To Ping
+ [Documentation] Wait for the given host to ping.
[Arguments] ${host} ${timeout}=${OPENBMC_REBOOT_TIMEOUT}min
... ${interval}=5 sec
@@ -127,6 +128,7 @@
Ping Host
+ [Documentation] Ping the given host.
[Arguments] ${host}
# Description of argument(s):
@@ -216,11 +218,13 @@
Is Power On
+ [Documentation] Verify that the BMC chassis state is on.
${state}= Get Power State
Should be equal ${state} ${1}
Is Power Off
+ [Documentation] Verify that the BMC chassis state is off.
${state}= Get Power State
Should be equal ${state} ${0}
@@ -440,6 +444,7 @@
Copy PNOR to BMC
+ [Documentation] Copy the PNOR image to the BMC.
Import Library SCPLibrary WITH NAME scp
Open Connection for SCP
Log Copying ${PNOR_IMAGE_PATH} to /tmp
@@ -508,6 +513,7 @@
Verify Ping and REST Authentication
+ [Documentation] Verify ping and rest authentication.
${l_ping}= Run Keyword And Return Status
... Ping Host ${OPENBMC_HOST}
Run Keyword If '${l_ping}' == '${False}'
@@ -1498,6 +1504,7 @@
Verify The Attribute
+ [Documentation] Verify the given attribute.
[Arguments] ${uri} ${attribute_name} ${attribute_value}
# Description of argument(s):
diff --git a/mnfg/test_factory_reset_zero_config.robot b/mnfg/test_factory_reset_zero_config.robot
index 0b05c85..36ad85e 100644
--- a/mnfg/test_factory_reset_zero_config.robot
+++ b/mnfg/test_factory_reset_zero_config.robot
@@ -36,6 +36,7 @@
Check Host Connection ${ip}
Check Host Connection
+ [Documentation] Verify that host can be pinged.
[Arguments] ${host}
${RC} ${output}= Run and return RC and Output ping -c 4 ${host}
Log RC: ${RC}\nOutput:\n${output}
diff --git a/network/test_network.robot b/network/test_network.robot
index 7cbaadf..012598a 100644
--- a/network/test_network.robot
+++ b/network/test_network.robot
@@ -378,8 +378,8 @@
Verify IP Address Via REST And Delete ${valid_ip}
Verify Default Gateway
- [Documentation] Verify default gateway.
- [Tags] Verify that the default gateway has a valid route.
+ [Documentation] Verify that the default gateway has a valid route.
+ [Tags] Verify_Default_Gateway.
${default_gw}= Read Attribute ${NETWORK_MANAGER}/config
... DefaultGateway
diff --git a/network/test_network_nping.robot b/network/test_network_nping.robot
index 9e067ac..c5c7f20 100644
--- a/network/test_network_nping.robot
+++ b/network/test_network_nping.robot
@@ -65,9 +65,12 @@
# Sample Output from "nping" command:
# Starting Nping 0.6.47 ( http://nmap.org/nping ) at 2017-02-21 22:05 IST
- # SENT (0.0181s) TCP Source IP:37577 > Destination IP:80 S ttl=64 id=39113 iplen=40 seq=629782493 win=1480
- # SENT (0.2189s) TCP Source IP:37577 > Destination IP:80 S ttl=64 id=39113 iplen=40 seq=629782493 win=1480
- # RCVD (0.4120s) TCP Destination IP:80 > Source IP:37577 SA ttl=49 id=0 iplen=44 seq=1078301364 win=5840 <mss 1380>
+ # SENT (0.0181s) TCP Source IP:37577 >
+ # Destination IP:80 S ttl=64 id=39113 iplen=40 seq=629782493 win=1480
+ # SENT (0.2189s) TCP Source IP:37577 >
+ # Destination IP:80 S ttl=64 id=39113 iplen=40 seq=629782493 win=1480
+ # RCVD (0.4120s) TCP Destination IP:80 >
+ # Source IP:37577 SA ttl=49 id=0 iplen=44 seq=1078301364 win=5840 <mss 1380>
# Max rtt: 193.010ms | Min rtt: 193.010ms | Avg rtt: 193.010ms
# Raw packets sent: 2 (80B) | Rcvd: 1 (46B) | Lost: 1 (50.00%)
# Nping done: 1 IP address pinged in 0.43 seconds
diff --git a/robot_standards b/robot_standards
new file mode 100644
index 0000000..87b1196
--- /dev/null
+++ b/robot_standards
@@ -0,0 +1,6 @@
+--configure LineTooLong: 110
+--ignore TooFewKeywordSteps
+--ignore TooFewTestSteps
+--ignore FileTooLong
+--ignore TooManyTestSteps
+--ignore TooManyTestCases
diff --git a/systest/Generate_OS_Inventory.robot b/systest/Generate_OS_Inventory.robot
index aa4bd4b..ddca239 100755
--- a/systest/Generate_OS_Inventory.robot
+++ b/systest/Generate_OS_Inventory.robot
@@ -19,5 +19,5 @@
Create An Inventory
[Documentation] Snapshot system inventory to a JSON file.
- [Tags] Inventory Test
+ [Tags] Inventory_Test
Create JSON Inventory File ${json_inventory_file_path}
diff --git a/templates/pgm_template.robot b/templates/pgm_template.robot
index 8ab75a9..946e3c9 100755
--- a/templates/pgm_template.robot
+++ b/templates/pgm_template.robot
@@ -26,5 +26,5 @@
*** Test Cases ***
Test Case 1
-
+ [Documentation] <test case doc here>
Print Timen First test case.
diff --git a/tests/__init__.robot b/tests/__init__.robot
index 412821e..e3699c8 100644
--- a/tests/__init__.robot
+++ b/tests/__init__.robot
@@ -30,6 +30,7 @@
Run Keyword And Ignore Error Clear BMC Gard Record
Set Boot Defaults
+ [Documentation] Set boot defaults.
Set Control Boot Mode ${CONTROL_HOST_URI}/boot ${BOOT_MODE_REGULAR}
Set Control Boot Mode
... ${CONTROL_HOST_URI}/boot/one_time ${BOOT_MODE_REGULAR}
diff --git a/tests/test_boot_devices.robot b/tests/test_boot_devices.robot
index 3584eec..9811532 100644
--- a/tests/test_boot_devices.robot
+++ b/tests/test_boot_devices.robot
@@ -219,10 +219,12 @@
Response Should Be Equal
+ [Documentation] Verify that the output is equal to the given args.
[Arguments] ${args}
Should Be Equal ${OUTPUT} ${args}
Read the Attribute
+ [Documentation] Read the given attribute.
[Arguments] ${uri} ${parm}
${output}= Read Attribute ${uri} ${parm}
Set Test Variable ${OUTPUT} ${output}
diff --git a/tests/test_boot_policies.robot b/tests/test_boot_policies.robot
index f4c2bd7..02b049e 100644
--- a/tests/test_boot_policies.robot
+++ b/tests/test_boot_policies.robot
@@ -139,12 +139,14 @@
*** Keywords ***
Set Boot Mode
+ [Documentation] Set the host boot mode via REST.
[Arguments] ${args}
${bootmode}= Set Variable ${args}
${valueDict}= Create Dictionary data=${bootmode}
Write Attribute ${CONTROL_HOST_URI}/boot/ BootMode data=${valueDict}
Set Boot Policy
+ [Documentation] Set the host boot policy via REST.
[Arguments] ${args}
${bootpolicy}= Set Variable ${args}
${valueDict}= Create Dictionary data=${bootpolicy}
diff --git a/tests/test_hardware_sensors.robot b/tests/test_hardware_sensors.robot
index 237bcb8..eb7cc57 100644
--- a/tests/test_hardware_sensors.robot
+++ b/tests/test_hardware_sensors.robot
@@ -250,7 +250,7 @@
Enable Power Redundancy And Verify Using REST
[Documentation] Enable power redundancy and verify that it is enabled.
- [Tags] Enable_Power_Redundancy_And_Verify_Using REST
+ [Tags] Enable_Power_Redundancy_And_Verify_Using_REST
# Example:
# /xyz/openbmc_project/sensors/chassis/PowerSupplyRedundancy
diff --git a/tests/test_inventory.robot b/tests/test_inventory.robot
index 1f075c4..0d177e3 100644
--- a/tests/test_inventory.robot
+++ b/tests/test_inventory.robot
@@ -302,7 +302,7 @@
${core_list}= Get Endpoint Paths ${HOST_INVENTORY_URI}system core
:FOR ${core_uri} IN @{core_list}
\ ${status}= Run Keyword And Return Status
- ... Check URL Property If Functional ${core_uri}
+ ... Check URL Property Is Functional ${core_uri}
\ Continue For Loop If '${status}' == '${False}'
\ ${present}= Read Attribute ${core_uri} Present
\ Should Be True ${present}
@@ -331,7 +331,7 @@
${dimm_list}= Get Endpoint Paths ${HOST_INVENTORY_URI}system dimm
:FOR ${dimm_uri} IN @{dimm_list}
\ ${status}= Run Keyword And Return Status
- ... Check URL Property If Functional ${dimm_uri}
+ ... Check URL Property Is Functional ${dimm_uri}
\ Continue For Loop If '${status}' == '${False}'
\ ${present}= Read Attribute ${dimm_uri} Present
\ Should Be True ${present}
@@ -353,7 +353,7 @@
Should Not Be Empty ${fan_list}
:FOR ${fan_uri} IN @{fan_list}
\ ${status}= Run Keyword And Return Status
- ... Check URL Property If Functional ${fan_uri}
+ ... Check URL Property Is Functional ${fan_uri}
\ Continue For Loop If '${status}' == '${False}'
\ ${present}= Read Attribute ${fan_uri} Present
\ Should Be True ${present}
@@ -375,7 +375,7 @@
Should Not Be Empty ${cpu_list}
:FOR ${cpu_uri} IN @{cpu_list}
\ ${status}= Run Keyword And Return Status
- ... Check URL Property If Functional ${cpu_uri}
+ ... Check URL Property Is Functional ${cpu_uri}
\ Continue For Loop If '${status}' == '${False}'
\ ${present}= Read Attribute ${cpu_uri} Present
\ Should Be True ${present}
@@ -400,7 +400,7 @@
Should Not Be Empty ${gpu_list}
:FOR ${gpu_uri} IN @{gpu_list}
\ ${status}= Run Keyword And Return Status
- ... Check URL Property If Functional ${gpu_uri}
+ ... Check URL Property Is Functional ${gpu_uri}
\ Continue For Loop If '${status}' == '${False}'
\ ${present}= Read Attribute ${gpu_uri} Present
\ Should Be True ${present}
@@ -616,7 +616,8 @@
\ Should Be Equal ${fru_field.viewkeys()} ${fru_set}
-Check URL Property If Functional
+Check URL Property Is Functional
+ [Documentation] Verify that the given url property is functional.
[Arguments] ${url_path}
# Description of arguments:
# url_path Full url path of the inventory object.
diff --git a/tests/test_power_restore.robot b/tests/test_power_restore.robot
index f9479f6..c4dca6b 100644
--- a/tests/test_power_restore.robot
+++ b/tests/test_power_restore.robot
@@ -46,6 +46,7 @@
${ALWAYS_POWER_OFF} Running Running
+ [Documentation] Verify that the BMC restore policy is ALWAYS_POWER_OFF while the Host is running.
[Template] Verify Restore Policy
[Tags] Test_Restore_Policy_ALWAYS_POWER_OFF_With_Host_Running
@@ -74,6 +75,7 @@
${ALWAYS_POWER_ON} Running Running
+ [Documentation] Verify the BMC restore policy is ALWAYS_POWER_ON while the Host is running.
[Template] Verify Restore Policy
[Tags] Test_Restore_Policy_ALWAYS_POWER_ON_With_Host_Running
@@ -102,7 +104,7 @@
${RESTORE_LAST_STATE} Off Off
-
+ [Documentation] Verify the RESTORE_LAST_STATE restore policy functionality while the Host is off.
[Template] Verify Restore Policy
[Tags] Test_Restore_Policy_Restore_Last_State_With_Host_Off
diff --git a/tests/test_rest_interfaces.robot b/tests/test_rest_interfaces.robot
index 87db39b..82d621f 100644
--- a/tests/test_rest_interfaces.robot
+++ b/tests/test_rest_interfaces.robot
@@ -94,7 +94,8 @@
# Example:
# Response code:404, Content:{
# "data": {
- # "description": "org.freedesktop.DBus.Error.FileNotFound: path or object not found: /xyz/idont/exist"
+ # "description": "org.freedesktop.DBus.Error.FileNotFound: path or object not found:
+ # /xyz/idont/exist"
# },
# "message": "404 Not Found",
# "status": "error"
@@ -102,8 +103,8 @@
${resp}= OpenBMC Get Request /xyz/idont/exist/
${jsondata}= To JSON ${resp.content}
- Should Be Equal As Strings
- ... ${jsondata["data"]["description"]} org.freedesktop.DBus.Error.FileNotFound: path or object not found: /xyz/idont/exist
+ Should Be Equal As Strings ${jsondata["data"]["description"]}
+ ... org.freedesktop.DBus.Error.FileNotFound: path or object not found: /xyz/idont/exist
Should Be Equal As Strings ${jsondata["message"]} 404 Not Found
Should Be Equal As Strings ${jsondata["status"]} error
@@ -328,7 +329,8 @@
#--------------------------------------------------------------------
# URL Path Parm Data
#--------------------------------------------------------------------
- /xyz/openbmc_project/state/host0/attr/RequestedHostTransition xyz.openbmc_project.State.Host.Transition.Off
+ /xyz/openbmc_project/state/host0/attr/RequestedHostTransition
+ ... xyz.openbmc_project.State.Host.Transition.Off
[Tags] Put_Data_Validation
[Template] Execute Put And Expect Success
diff --git a/tests/test_sensors.robot b/tests/test_sensors.robot
index 5db2436..05840c6 100644
--- a/tests/test_sensors.robot
+++ b/tests/test_sensors.robot
@@ -24,11 +24,13 @@
*** Test Cases ***
io_board Present
+ [Documentation] Verify that the IO board is present.
[Tags] io_board_Present
${uri}= Get System component io_board
Verify The Attribute ${uri} Present ${True}
io_board Fault
+ [Documentation] Verify that the IO board signals "fault".
[Tags] io_board_Fault
${uri}= Get System component io_board
Verify The Attribute ${uri} fault ${False}
@@ -46,6 +48,7 @@
log Dictionary ${resp}
Get System component
+ [Documentation] Get the system component.
[Arguments] ${type}
${list}= Get Dictionary Keys ${SYSTEM_INFO}
${resp}= Get Matches ${list} regexp=^.*[0-9a-z_].${type}[0-9]*$
diff --git a/tests/test_soft_boot_sensors.robot b/tests/test_soft_boot_sensors.robot
index d90fec2..aca4055 100644
--- a/tests/test_soft_boot_sensors.robot
+++ b/tests/test_soft_boot_sensors.robot
@@ -36,6 +36,7 @@
Verify Boot AttemptsLeft At Host Booted
+ [Documentation] Verify the number of Host boot attempts left.
[Tags] Verify_Boot_AttemptsLeft_At_Host_Booted
[Template] Validate Boot AttemptsLeft
@@ -44,6 +45,7 @@
Verify Boot AttemptsLeft When Host Reboot
+ [Documentation] Verify the number of Host reboots left.
[Tags] Verify_Boot_AttemptsLeft_When_Host_Reboot
[Template] Validate Boot AttemptsLeft
@@ -52,6 +54,7 @@
Verify Boot AttemptsLeft When Power Off
+ [Documentation] Verify the number of boots left while the system is poweref off.
[Tags] Verify_Boot_AttemptsLeft_When_Power_Off
[Template] Validate Boot AttemptsLeft
diff --git a/tools/myffdc.robot b/tools/myffdc.robot
index 0fd9c5a..77d5b78 100755
--- a/tools/myffdc.robot
+++ b/tools/myffdc.robot
@@ -42,4 +42,5 @@
** Keywords ***
Gather FFDC
+ [Documentation] Collect FFDC.
Run Keyword And Ignore Error FFDC
diff --git a/xcat/test_xcat_group.robot b/xcat/test_xcat_group.robot
index 3df04c8..57a19b0 100644
--- a/xcat/test_xcat_group.robot
+++ b/xcat/test_xcat_group.robot
@@ -151,7 +151,6 @@
\ Should Match ${fanspeed} ${bmc}* RPMS
\ Log \n fanspeed on $[bmc}\n ${fanspeed}
-*** Comment ***
Get Voltage Reading Via XCAT
[Documentation] Get voltage via XCAT.