Check "Front and Rear LED" state by LED group
Not all the platforms have the same physical LEDs but they all have the
same LED group for indentify LED.
Change-Id: Idfd18668e9fcb8ab32f2651719f21ab6f485e334
Signed-off-by: Alvin Wang <alvinwang@msn.com>
diff --git a/lib/utils.robot b/lib/utils.robot
index 6e5ef14..34fa216 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -601,23 +601,14 @@
Verify Identify LED State
- [Documentation] Verify the identify LED state
- ... matches caller's expectations.
+ [Documentation] Verify that the identify state of the LED group matches caller's expectations.
[Arguments] ${expected_state}
# Description of argument(s):
- # expected_state The LED state expected by the caller ("Blink" or "Off").
+ # expected_state The expected LED asserted state (1 = asserted, 0 = not asserted).
- ${resp}= Read Attribute ${LED_PHYSICAL_URI}/front_id State
- Should Be Equal ${resp}
- ... xyz.openbmc_project.Led.Physical.Action.${expected_state}
- ... msg=Unexpected LED state.
-
- ${resp}= Read Attribute ${LED_PHYSICAL_URI}/rear_id State
- Should Be Equal ${resp}
- ... xyz.openbmc_project.Led.Physical.Action.${expected_state}
- ... msg=Unexpected LED state.
-
+ ${led_state}= Get LED State XYZ enclosure_identify
+ Should Be Equal ${led_state} ${expected_state} msg=Unexpected LED state.
Verify The Attribute
[Documentation] Verify the given attribute.
diff --git a/tests/ipmi/test_general_ipmi.robot b/tests/ipmi/test_general_ipmi.robot
index a358701..2d7283d 100755
--- a/tests/ipmi/test_general_ipmi.robot
+++ b/tests/ipmi/test_general_ipmi.robot
@@ -41,17 +41,17 @@
# Set to default "chassis identify" and verify that LED blinks for 15s.
Run IPMI Standard Command chassis identify
- Verify Identify LED State Blink
+ Verify Identify LED State ${1}
Sleep 15s
- Verify Identify LED State Off
+ Verify Identify LED State ${0}
# Set "chassis identify" to 10s and verify that the LED blinks for 10s.
Run IPMI Standard Command chassis identify 10
- Verify Identify LED State Blink
+ Verify Identify LED State ${1}
Sleep 10s
- Verify Identify LED State Off
+ Verify Identify LED State ${0}
Verify Chassis Identify Off And Force Identify On via IPMI
@@ -61,11 +61,11 @@
# Set the LED to "Force Identify On".
Run IPMI Standard Command chassis identify force
- Verify Identify LED State Blink
+ Verify Identify LED State ${1}
# Set "chassis identify" to 0 and verify that the LED turns off.
Run IPMI Standard Command chassis identify 0
- Verify Identify LED State Off
+ Verify Identify LED State ${0}
Test Watchdog Reset Via IPMI And Verify Using REST
diff --git a/tests/test_basic_poweron.robot b/tests/test_basic_poweron.robot
index 052597d..ad4db6f 100644
--- a/tests/test_basic_poweron.robot
+++ b/tests/test_basic_poweron.robot
@@ -52,7 +52,7 @@
[Tags] Verify_Front_And_Rear_LED_At_Standby
REST Power Off stack_mode=skip quiet=1
- Verify Identify LED State Off
+ Verify Identify LED State ${0}
Verify Application Services Running At Standby