[PATCH openbmc-test-automation 13/60] fixed review comments

OpenBMC Patches openbmc-patches at stwcx.xyz
Tue Jan 12 03:49:39 AEDT 2016


From: Chris Austen <austenc at us.ibm.com>

---
 tests/test_sensors.robot | 33 ++++++++++-----------------------
 1 file changed, 10 insertions(+), 23 deletions(-)

diff --git a/tests/test_sensors.robot b/tests/test_sensors.robot
index b36b059..79ba4d7 100644
--- a/tests/test_sensors.robot
+++ b/tests/test_sensors.robot
@@ -5,7 +5,7 @@ Documentation          This example demonstrates executing commands on a remote
 ...                    Notice how connections are handled as part of the suite setup and
 ...                    teardown. This saves some time when executing several test cases.
 
-Resource          ../lib/rest_client.robot
+Resource		../lib/rest_client.robot
 
 
 Library                SSHLibrary
@@ -13,42 +13,29 @@ Suite Setup            Open Connection And Log In
 Suite Teardown         Close All Connections
 
 *** Variables ***
-${HOST}                9.3.164.147
-${USERNAME}            root
-${PASSWORD}            0penBmc
 
-*** Test Cases ***
-Execute Command And Verify Output
-	[Documentation]    Execute Command on the remote machine.
-	${output}=    Execute Command    echo Hello
-	Should Be Equal    ${output}    Hello
-
-Execute Sending a file
-	put file    ./tfile /home/root
 
+*** Test Cases ***
 Execute ipmi BT capabilities command
-	${output}=    Execute Command    /home/root/ipmitool -I dbus raw 0x06 0x36
-	Should Be Equal    "${output}"    " 01 3f 3f 0a 01"
-
-Execute Boot Sensoripmi BT capabilities command
-	${output}=    Execute Command    /home/root/ipmitool -I dbus raw 0x06 0x36
-	Should Be Equal    "${output}"    " 01 3f 3f 0a 01"
+	${output}=    Run IPMI command 		0x06 0x36
+	Should Be Equal		"${output}"		" 01 3f 3f 0a 01"
 
 Execute Set Sensor boot count
 	Run IPMI command  0x04 0x30 0x09 0x01 0x00 0x35 0x00 0x00 0x00 0x00 0x00 0x00
 	${value} =  Read attribute	/org/openbmc/sensor/virtual/BootCount	value
-	Should Be Equal ${value}    "53"
+	Should Be Equal		${value}	"53"
 
 
 
 *** Keywords ***
 Open Connection And Log In
-   Open Connection    ${HOST}
-   Login    ${USERNAME}    ${PASSWORD}
+	Open connection 	${OPENBMC_HOST}
+	Login	${OPENBMC_USERNAME}	${OPENBMC_PASSWORD}
 
 Run IPMI Command
-	[arguments]     ${args}
-	${output}=      Execute Command    /home/root/ipmitool -I dbus raw ${args}
+	[arguments]	${args}
+	${output}=	Execute Command    /home/root/ipmitool -I dbus raw ${args}
+	[return]	${output}
 
 Read attribute
 	[arguments]	${uri}	${attr}
-- 
2.6.4




More information about the openbmc mailing list