Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
Rahul Maheshwari | c8898e1 | 2017-03-30 23:30:01 -0500 | [diff] [blame] | 3 | Documentation Test the functions of system LEDs. |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 4 | |
| 5 | Resource ../lib/rest_client.robot |
Rahul Maheshwari | c8898e1 | 2017-03-30 23:30:01 -0500 | [diff] [blame] | 6 | Resource ../lib/state_manager.robot |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 7 | Resource ../lib/resource.txt |
George Keishing | d55a4be | 2016-08-26 03:28:17 -0500 | [diff] [blame] | 8 | Resource ../lib/openbmc_ffdc.robot |
Rahul Maheshwari | c8898e1 | 2017-03-30 23:30:01 -0500 | [diff] [blame] | 9 | |
Gunnar Mills | eac1af2 | 2016-11-14 15:30:09 -0600 | [diff] [blame] | 10 | Test Teardown FFDC On Test Case Fail |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 11 | |
Rahul Maheshwari | c8898e1 | 2017-03-30 23:30:01 -0500 | [diff] [blame] | 12 | Force Tags System_LED |
| 13 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 14 | *** Variables *** |
| 15 | |
George Keishing | ab1bd92 | 2016-12-05 05:29:59 -0600 | [diff] [blame] | 16 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 17 | *** Test Cases *** |
| 18 | |
Rahul Maheshwari | c8898e1 | 2017-03-30 23:30:01 -0500 | [diff] [blame] | 19 | Test Heartbeat LED And Verify Via REST |
| 20 | [Documentation] Turn On Off heartbeat LED and verify via REST. |
| 21 | #LED Name LED State |
| 22 | heartbeat On |
| 23 | heartbeat Off |
George Keishing | f722616 | 2016-07-08 06:25:07 -0500 | [diff] [blame] | 24 | |
Rahul Maheshwari | c8898e1 | 2017-03-30 23:30:01 -0500 | [diff] [blame] | 25 | [Tags] Test_Heartbeat_LED_And_Verify_Via_REST |
| 26 | [Template] Set System LED State |
George Keishing | f722616 | 2016-07-08 06:25:07 -0500 | [diff] [blame] | 27 | |
Rahul Maheshwari | c8898e1 | 2017-03-30 23:30:01 -0500 | [diff] [blame] | 28 | Test Beep LED And Verify Via REST |
| 29 | [Documentation] Turn On Off beep LED and verify via REST. |
| 30 | #LED Name LED State |
| 31 | beep On |
| 32 | beep Off |
| 33 | |
| 34 | [Tags] Test_Beep_LED_And_Verify_Via_REST |
| 35 | [Template] Set System LED State |
| 36 | |
| 37 | Test Identify LED And Verify Via REST |
| 38 | [Documentation] Turn On Off identify LED and verify via REST. |
| 39 | #LED Name LED State |
| 40 | identify On |
| 41 | identify Off |
| 42 | |
| 43 | [Tags] Test_Identify_LED_And_Verify_Via_REST |
| 44 | [Template] Set System LED State |
| 45 | |
Rahul Maheshwari | 5158d4b | 2017-04-26 09:45:07 -0500 | [diff] [blame] | 46 | Test Power LED And Verify Via REST |
| 47 | [Documentation] Turn On/Off power LED and verify via REST. |
| 48 | # LED Name LED State |
George Keishing | f537e63 | 2017-06-15 05:02:07 -0500 | [diff] [blame] | 49 | rear_power On |
| 50 | rear_power Off |
Sweta Potthuri | 8faf9d8 | 2017-08-23 04:25:56 -0500 | [diff] [blame] | 51 | front_power On |
| 52 | front_power Off |
Rahul Maheshwari | 5158d4b | 2017-04-26 09:45:07 -0500 | [diff] [blame] | 53 | |
| 54 | [Tags] Test_Power_LED_And_Verify_Via_REST |
| 55 | [Template] Set System LED State |
| 56 | |
| 57 | Test Fault LED And Verify Via REST |
| 58 | [Documentation] Turn On/Off fault LED and verify via REST. |
| 59 | # LED Name LED State |
Sweta Potthuri | bf19dbe | 2017-06-14 03:25:01 -0500 | [diff] [blame] | 60 | rear_fault On |
| 61 | rear_fault Off |
Sweta Potthuri | 8faf9d8 | 2017-08-23 04:25:56 -0500 | [diff] [blame] | 62 | front_fault On |
| 63 | front_fault Off |
Rahul Maheshwari | 5158d4b | 2017-04-26 09:45:07 -0500 | [diff] [blame] | 64 | |
| 65 | [Tags] Test_Fault_LED_And_Verify_Via_REST |
| 66 | [Template] Set System LED State |
George Keishing | f722616 | 2016-07-08 06:25:07 -0500 | [diff] [blame] | 67 | |
Rahul Maheshwari | 7bfc0c9 | 2017-07-07 00:50:47 -0500 | [diff] [blame] | 68 | Test Rear Identify LED And Verify Via REST |
Sweta Potthuri | 8faf9d8 | 2017-08-23 04:25:56 -0500 | [diff] [blame] | 69 | [Documentation] Turn On/Off identify LED and verify via REST. |
Rahul Maheshwari | 7bfc0c9 | 2017-07-07 00:50:47 -0500 | [diff] [blame] | 70 | #LED Name LED State |
| 71 | rear_id On |
| 72 | rear_id Off |
Sweta Potthuri | 8faf9d8 | 2017-08-23 04:25:56 -0500 | [diff] [blame] | 73 | front_id On |
| 74 | front_id Off |
Rahul Maheshwari | 7bfc0c9 | 2017-07-07 00:50:47 -0500 | [diff] [blame] | 75 | |
| 76 | [Tags] Test_Rear_Identify_LED_And_Verify_Via_REST |
| 77 | [Template] Set System LED State |
| 78 | |
| 79 | |
Rahul Maheshwari | e33ac38 | 2017-07-24 02:15:39 -0500 | [diff] [blame] | 80 | Verify Rear Power LED With Host Power Off |
Sweta Potthuri | 8faf9d8 | 2017-08-23 04:25:56 -0500 | [diff] [blame] | 81 | [Documentation] Verify power LED state with host power off. |
Rahul Maheshwari | e33ac38 | 2017-07-24 02:15:39 -0500 | [diff] [blame] | 82 | [Tags] Verify_Rear_Power_LED_With_Host_Power_Off |
| 83 | |
| 84 | Initiate Host PowerOff |
| 85 | ${resp}= Get System LED State rear_power |
| 86 | Should Be Equal ${resp} Off |
Sweta Potthuri | 8faf9d8 | 2017-08-23 04:25:56 -0500 | [diff] [blame] | 87 | ${resp}= Get System LED State front_power |
| 88 | Should Be Equal ${resp} Off |
Rahul Maheshwari | e33ac38 | 2017-07-24 02:15:39 -0500 | [diff] [blame] | 89 | |
| 90 | |
| 91 | Verify Rear Power LED With Host Power On |
Sweta Potthuri | 8faf9d8 | 2017-08-23 04:25:56 -0500 | [diff] [blame] | 92 | [Documentation] Verify power LED state with host power on. |
Rahul Maheshwari | e33ac38 | 2017-07-24 02:15:39 -0500 | [diff] [blame] | 93 | [Tags] Verify_Rear_Power_LED_With_Host_Power_On |
| 94 | |
| 95 | Initiate Host Boot |
| 96 | ${resp}= Get System LED State rear_power |
| 97 | Should Be Equal ${resp} On |
Sweta Potthuri | 8faf9d8 | 2017-08-23 04:25:56 -0500 | [diff] [blame] | 98 | ${resp}= Get System LED State front_power |
| 99 | Should Be Equal ${resp} On |
Rahul Maheshwari | e33ac38 | 2017-07-24 02:15:39 -0500 | [diff] [blame] | 100 | |
George Keishing | f722616 | 2016-07-08 06:25:07 -0500 | [diff] [blame] | 101 | *** Keywords *** |
| 102 | |
Rahul Maheshwari | c8898e1 | 2017-03-30 23:30:01 -0500 | [diff] [blame] | 103 | Set System LED State |
| 104 | [Documentation] Set given system LED via REST. |
| 105 | [Arguments] ${led_name} ${led_state} |
| 106 | # Description of arguments: |
| 107 | # led_name System LED name (e.g. heartbeat, identify, beep). |
| 108 | # led_state LED state to be set (e.g. On, Off). |
George Keishing | f722616 | 2016-07-08 06:25:07 -0500 | [diff] [blame] | 109 | |
Rahul Maheshwari | c8898e1 | 2017-03-30 23:30:01 -0500 | [diff] [blame] | 110 | ${args}= Create Dictionary data=xyz.openbmc_project.Led.Physical.Action.${led_state} |
| 111 | Write Attribute ${LED_PHYSICAL_URI}${led_name} State data=${args} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 112 | |
Rahul Maheshwari | c8898e1 | 2017-03-30 23:30:01 -0500 | [diff] [blame] | 113 | Verify LED State ${led_name} ${led_state} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 114 | |
Rahul Maheshwari | c8898e1 | 2017-03-30 23:30:01 -0500 | [diff] [blame] | 115 | Verify LED State |
| 116 | [Documentation] Checks if LED is in given state. |
| 117 | [Arguments] ${led_name} ${led_state} |
| 118 | # Description of arguments: |
| 119 | # led_name System LED name (e.g. heartbeat, identify, beep). |
| 120 | # led_state LED state to be verified (e.g. On, Off). |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 121 | |
Rahul Maheshwari | c8898e1 | 2017-03-30 23:30:01 -0500 | [diff] [blame] | 122 | ${state}= Get System LED State ${led_name} |
| 123 | Should Be Equal ${state} ${led_state} |