Charles Paul Hofer | 862685c | 2017-09-19 17:09:19 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Verify that the host boots between code updates of different |
| 3 | ... PNOR version. Verify with N, the current version, downgrade |
| 4 | ... and verify with N-1, update and verify N again, and finally |
| 5 | ... update and verify with N+1. |
| 6 | |
| 7 | Library ../../lib/code_update_utils.py |
| 8 | Variables ../../data/variables.py |
| 9 | Resource ../../lib/boot_utils.robot |
| 10 | Resource ../../lib/code_update_utils.robot |
| 11 | Resource ../../lib/openbmc_ffdc.robot |
| 12 | |
| 13 | Suite Setup Suite Setup Execution |
| 14 | |
| 15 | Test Teardown FFDC On Test Case Fail |
| 16 | |
| 17 | *** Variables *** |
| 18 | |
| 19 | ${QUIET} ${1} |
| 20 | ${IMAGE_FILE_PATH} ${EMPTY} |
| 21 | ${N_MINUS_ONE_IMAGE_FILE_PATH} ${EMPTY} |
| 22 | ${N_PLUS_ONE_IMAGE_FILE_PATH} ${EMPTY} |
| 23 | |
| 24 | *** Test Cases *** |
| 25 | |
George Keishing | 4f37a7e | 2018-09-22 13:08:35 -0500 | [diff] [blame] | 26 | Host Multi Code Update |
Charles Paul Hofer | 862685c | 2017-09-19 17:09:19 -0500 | [diff] [blame] | 27 | [Documentation] Do four code updates in a row. Update to N, N-1, N, and |
| 28 | ... then N+1. |
George Keishing | 4f37a7e | 2018-09-22 13:08:35 -0500 | [diff] [blame] | 29 | [Tags] Host_Multi_Code_Update |
Charles Paul Hofer | 862685c | 2017-09-19 17:09:19 -0500 | [diff] [blame] | 30 | [Template] Code Update And Power On Host |
| 31 | |
| 32 | # Image File Path |
| 33 | ${IMAGE_FILE_PATH} |
| 34 | ${N_MINUS_ONE_IMAGE_FILE_PATH} |
| 35 | ${IMAGE_FILE_PATH} |
| 36 | ${N_PLUS_ONE_IMAGE_FILE_PATH} |
| 37 | |
| 38 | |
| 39 | *** Keywords *** |
| 40 | |
| 41 | Suite Setup Execution |
| 42 | [Documentation] Do test suite setup tasks. |
| 43 | |
| 44 | Should Not Be Empty ${IMAGE_FILE_PATH} msg=Must set IMAGE_FILE_PATH. |
| 45 | Should Not Be Empty ${N_MINUS_ONE_IMAGE_FILE_PATH} |
| 46 | ... msg=Must set N_MINUS_ONE_IMAGE_FILE_PATH. |
| 47 | Should Not Be Empty ${N_PLUS_ONE_IMAGE_FILE_PATH} |
| 48 | ... msg=N_PLUS_ONE_IMAGE_FILE_PATH. |
| 49 | Should Not Be Empty ${OS_HOST} msg=Must set OS_HOST. |
| 50 | Should Not Be Empty ${OS_USERNAME} msg=Must set OS_USERNAME. |
| 51 | Should Not Be Empty ${OS_PASSWORD} msg=Must set OS_PASSWORD. |
| 52 | |
| 53 | |
| 54 | Code Update And Power On Host |
| 55 | [Documentation] Shutdown the host, update to the given image, and then |
| 56 | ... verify that the host is able to power on. |
| 57 | [Arguments] ${image_file_path} |
| 58 | |
| 59 | # Description of argument(s): |
| 60 | # image_file_path Path to the host image file. |
| 61 | |
| 62 | REST Power Off stack_mode=skip quiet=${1} |
| 63 | Delete All PNOR Images |
| 64 | Upload And Activate Image ${image_file_path} |
| 65 | REST Power On |