Charles Paul Hofer | 9f74d3a | 2017-08-18 09:54:28 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Update the BMC code on a target BMC. |
| 3 | ... Execution Method: |
| 4 | ... python -m robot -v OPENBMC_HOST:<hostname> |
| 5 | ... -v IMAGE_FILE_PATH:<path/*.tar> bmc_code_update.robot |
| 6 | |
| 7 | Library ../../lib/code_update_utils.py |
| 8 | Variables ../../data/variables.py |
| 9 | Resource ../../lib/boot_utils.robot |
| 10 | Resource code_update_utils.robot |
| 11 | Resource ../../lib/code_update_utils.robot |
George Keishing | 1eb85f5 | 2017-08-30 22:55:13 -0500 | [diff] [blame] | 12 | Resource ../../lib/openbmc_ffdc.robot |
| 13 | Resource ../../lib/dump_utils.robot |
Charles Paul Hofer | 9f74d3a | 2017-08-18 09:54:28 -0500 | [diff] [blame] | 14 | |
George Keishing | 0071549 | 2017-08-18 11:46:37 -0500 | [diff] [blame] | 15 | Test Teardown Code Update Test Teardown |
Charles Paul Hofer | 9f74d3a | 2017-08-18 09:54:28 -0500 | [diff] [blame] | 16 | |
| 17 | *** Variables *** |
| 18 | |
| 19 | ${QUIET} ${1} |
| 20 | ${IMAGE_FILE_PATH} ${EMPTY} |
Charles Paul Hofer | c1fa2bc | 2017-08-18 16:44:03 -0500 | [diff] [blame] | 21 | ${ALTERNATE_IMAGE_FILE_PATH} ${EMPTY} |
Charles Paul Hofer | 9f74d3a | 2017-08-18 09:54:28 -0500 | [diff] [blame] | 22 | |
| 23 | *** Test Cases *** |
| 24 | |
| 25 | REST BMC Code Update |
| 26 | [Documentation] Do a BMC code update by uploading image on BMC via REST. |
| 27 | [Tags] REST_BMC_Code_Update |
George Keishing | 1eb85f5 | 2017-08-30 22:55:13 -0500 | [diff] [blame] | 28 | [Setup] Code Update Setup |
Charles Paul Hofer | 9f74d3a | 2017-08-18 09:54:28 -0500 | [diff] [blame] | 29 | |
| 30 | Upload And Activate Image ${IMAGE_FILE_PATH} |
| 31 | OBMC Reboot (off) |
| 32 | |
| 33 | |
Charles Paul Hofer | c1fa2bc | 2017-08-18 16:44:03 -0500 | [diff] [blame] | 34 | Upload And Activate Multiple BMC Images |
| 35 | [Documentation] Upload another BMC image and verify that its state is |
| 36 | ... different from all others. |
| 37 | [Tags] Upload_And_Activate_Multiple_BMC_Images |
| 38 | [Template] Activate Image And Verify No Duplicate Priorities |
| 39 | [Setup] Upload And Activate Multiple BMC Images Setup |
| 40 | |
| 41 | # Image File Path Image Purpose |
| 42 | ${ALTERNATE_IMAGE_FILE_PATH} ${VERSION_PURPOSE_BMC} |
| 43 | |
| 44 | |
Charles Paul Hofer | 9f74d3a | 2017-08-18 09:54:28 -0500 | [diff] [blame] | 45 | Delete BMC Image |
| 46 | [Documentation] Delete a BMC image from the BMC flash chip. |
| 47 | [Tags] Delete_BMC_Image |
| 48 | |
| 49 | ${software_object}= Get Non Running BMC Software Object |
| 50 | Delete Image And Verify ${software_object} ${VERSION_PURPOSE_BMC} |
Charles Paul Hofer | c1fa2bc | 2017-08-18 16:44:03 -0500 | [diff] [blame] | 51 | |
| 52 | |
| 53 | *** Keywords *** |
| 54 | |
| 55 | Upload And Activate Multiple BMC Images Setup |
| 56 | [Documentation] Check that the ALTERNATE_FILE_PATH variable is set. |
| 57 | |
George Keishing | 1eb85f5 | 2017-08-30 22:55:13 -0500 | [diff] [blame] | 58 | Should Not Be Empty ${ALTERNATE_IMAGE_FILE_PATH} |
| 59 | |
| 60 | Code Update Setup |
| 61 | [Documentation] Do code update test case setup. |
| 62 | # - Clean up all existing BMC dumps. |
| 63 | |
| 64 | Delete All Dumps |
George Keishing | 0071549 | 2017-08-18 11:46:37 -0500 | [diff] [blame] | 65 | |
| 66 | Code Update Test Teardown |
| 67 | [Documentation] Do code update test case teardown. |
| 68 | # 1. Collect FFDC if test case failed. |
| 69 | # 2. Collect FFDC if test PASS but error log exists. |
| 70 | |
| 71 | FFDC On Test Case Fail |
| 72 | Run Keyword If '${TEST_STATUS}' == 'PASS' Check Error And Collect FFDC |