George Keishing | 5e870cd | 2016-08-24 10:05:47 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Trigger code update to a target BMC. |
| 3 | ... Execution Method : |
| 4 | ... python -m robot -v OPENBMC_HOST:<hostname> |
| 5 | ... -v FILE_PATH:<path/*all.tar> update_bmc.robot |
| 6 | ... |
| 7 | ... Code update method BMC using REST |
| 8 | ... Update work flow sequence: |
| 9 | ... - User input BMC File existence check |
| 10 | ... - Ping Test and REST authentication |
George Keishing | 8db0e1b | 2016-10-20 13:46:54 -0500 | [diff] [blame] | 11 | ... - Set Host Power host setting Policy to RESTORE_LAST_STATE |
| 12 | ... On reboot this policy would ensure the BMC comes |
| 13 | ... online and stays at HOST_POWERED_OFF state. |
George Keishing | dc5aa58e9 | 2016-09-27 01:35:11 -0500 | [diff] [blame] | 14 | ... - Issue poweroff |
George Keishing | 0bd59f1 | 2016-12-14 10:39:21 -0600 | [diff] [blame] | 15 | ... - Prune archived journal logs |
George Keishing | dc5aa58e9 | 2016-09-27 01:35:11 -0500 | [diff] [blame] | 16 | ... - Prepare for Update |
George Keishing | dc5aa58e9 | 2016-09-27 01:35:11 -0500 | [diff] [blame] | 17 | ... - Wait for BMC to come online clean |
George Keishing | 1b15020 | 2016-09-29 08:51:58 -0500 | [diff] [blame] | 18 | ... - Wait for BMC_READY state |
George Keishing | 5e870cd | 2016-08-24 10:05:47 -0500 | [diff] [blame] | 19 | ... - Apply preserve BMC Network setting |
| 20 | ... - SCP image to BMC |
| 21 | ... - Activate the flash image |
| 22 | ... - Warm Reset BMC to activate code |
| 23 | ... - Wait for BMC to come online time out 30 minutes |
| 24 | ... - Version check post update |
| 25 | |
| 26 | Resource code_update_utils.robot |
George Keishing | 8db0e1b | 2016-10-20 13:46:54 -0500 | [diff] [blame] | 27 | Resource ../../lib/boot/boot_resource_master.robot |
George Keishing | 5e870cd | 2016-08-24 10:05:47 -0500 | [diff] [blame] | 28 | |
| 29 | *** Variables *** |
| 30 | |
| 31 | ${FILE_PATH} ${EMPTY} |
| 32 | |
Gunnar Mills | 7c8923f | 2016-12-12 21:19:52 -0600 | [diff] [blame] | 33 | *** Test Cases *** |
George Keishing | 5e870cd | 2016-08-24 10:05:47 -0500 | [diff] [blame] | 34 | |
Sivas SRR | aca5571 | 2016-12-21 04:32:35 -0600 | [diff] [blame] | 35 | Test Basic BMC Performance Before Code Update |
| 36 | [Documentation] Check performance of memory, CPU & file system of BMC. |
| 37 | [Tags] Test_Basic_BMC_Performance_Before_Code_Update |
| 38 | Open Connection And Log In |
| 39 | Check BMC CPU Performance |
| 40 | Check BMC Mem Performance |
| 41 | Check BMC File System Performance |
| 42 | |
| 43 | Initiate Code Update BMC |
George Keishing | 5e870cd | 2016-08-24 10:05:47 -0500 | [diff] [blame] | 44 | [Documentation] BMC code update process initiation |
Sivas SRR | aca5571 | 2016-12-21 04:32:35 -0600 | [diff] [blame] | 45 | [Tags] Initiate_Code_Update_BMC |
George Keishing | 5e870cd | 2016-08-24 10:05:47 -0500 | [diff] [blame] | 46 | |
| 47 | Check If File Exist ${FILE_PATH} |
| 48 | System Readiness Test |
George Keishing | 50787fc | 2016-09-21 03:44:26 -0500 | [diff] [blame] | 49 | ${status}= Run Keyword and Return Status |
| 50 | ... Validate BMC Version before |
| 51 | |
| 52 | Run Keyword if '${status}' == '${False}' |
| 53 | ... Pass Execution Same Driver version installed |
| 54 | |
George Keishing | 0bd59f1 | 2016-12-14 10:39:21 -0600 | [diff] [blame] | 55 | Prune Journal Log |
George Keishing | dc5aa58e9 | 2016-09-27 01:35:11 -0500 | [diff] [blame] | 56 | Initiate Power Off |
Rahul Maheshwari | 4c1b99f | 2016-12-19 17:52:04 -0600 | [diff] [blame] | 57 | Run Keyword And Ignore Error |
| 58 | ... Set Policy Setting RESTORE_LAST_STATE |
George Keishing | dc5aa58e9 | 2016-09-27 01:35:11 -0500 | [diff] [blame] | 59 | Prepare For Update |
Rahul Maheshwari | d0fd883 | 2016-10-14 03:15:51 -0500 | [diff] [blame] | 60 | |
| 61 | # Wait time is increased temporary to 10 mins due |
| 62 | # to openbmc/openbmc#673 |
| 63 | Check If BMC is Up 10 min 10 sec |
George Keishing | 5e870cd | 2016-08-24 10:05:47 -0500 | [diff] [blame] | 64 | |
George Keishing | 8db0e1b | 2016-10-20 13:46:54 -0500 | [diff] [blame] | 65 | @{states}= Create List BMC_READY HOST_POWERED_OFF |
George Keishing | 1b15020 | 2016-09-29 08:51:58 -0500 | [diff] [blame] | 66 | Wait Until Keyword Succeeds |
George Keishing | 8db0e1b | 2016-10-20 13:46:54 -0500 | [diff] [blame] | 67 | ... 10 min 10 sec Verify BMC State ${states} |
George Keishing | 1b15020 | 2016-09-29 08:51:58 -0500 | [diff] [blame] | 68 | |
George Keishing | 2582bee | 2016-11-17 21:41:49 -0600 | [diff] [blame] | 69 | # TODO: openbmc/openbmc#815 |
| 70 | Sleep 1 min |
| 71 | |
George Keishing | 5e870cd | 2016-08-24 10:05:47 -0500 | [diff] [blame] | 72 | Preserve BMC Network Setting |
| 73 | SCP Tar Image File to BMC ${FILE_PATH} |
| 74 | |
| 75 | Activate BMC flash image |
| 76 | |
George Keishing | b370081 | 2016-08-31 03:03:30 -0500 | [diff] [blame] | 77 | Run Keyword And Ignore Error Trigger Warm Reset |
George Keishing | f68c9eb | 2016-12-01 08:09:58 -0600 | [diff] [blame] | 78 | # Warm reset adds 3 seconds delay before forcing reboot |
| 79 | # To minimize race conditions, we wait for 7 seconds |
| 80 | Sleep 7s |
George Keishing | 5e870cd | 2016-08-24 10:05:47 -0500 | [diff] [blame] | 81 | ${session_active}= Check If warmReset is Initiated |
| 82 | Run Keyword If '${session_active}' == '${True}' |
| 83 | ... Trigger Warm Reset via Reboot |
| 84 | |
George Keishing | c4d3dc0 | 2016-09-19 03:45:55 -0500 | [diff] [blame] | 85 | Check If BMC is Up 30 min 10 sec |
George Keishing | 5e870cd | 2016-08-24 10:05:47 -0500 | [diff] [blame] | 86 | Sleep 1 min |
| 87 | Validate BMC Version |
Sivas SRR | ea85d1f | 2016-11-13 22:44:28 -0600 | [diff] [blame] | 88 | Wait Until Keyword Succeeds |
| 89 | ... 10 min 10 sec Verify BMC State BMC_READY |
| 90 | |
Sivas SRR | aca5571 | 2016-12-21 04:32:35 -0600 | [diff] [blame] | 91 | |
| 92 | Test Basic BMC Performance At Ready State |
| 93 | [Documentation] Check performance of memory, CPU & file system of BMC. |
| 94 | [Tags] Test_Basic_BMC_Performance_At_Ready_State |
George Keishing | 128643a | 2016-12-15 11:36:46 -0600 | [diff] [blame] | 95 | Open Connection And Log In |
Sivas SRR | ea85d1f | 2016-11-13 22:44:28 -0600 | [diff] [blame] | 96 | Check BMC CPU Performance |
| 97 | Check BMC Mem Performance |
Sivas SRR | aca5571 | 2016-12-21 04:32:35 -0600 | [diff] [blame] | 98 | Check BMC File System Performance |
| 99 | |
| 100 | |