blob: cb68a33c41feed5c979a89df65cf96f3974857c8 [file] [log] [blame]
Charles Paul Hofer862685c2017-09-19 17:09:19 -05001*** Settings ***
2Documentation 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
7Library ../../lib/code_update_utils.py
8Variables ../../data/variables.py
9Resource ../../lib/boot_utils.robot
10Resource ../../lib/code_update_utils.robot
11Resource ../../lib/openbmc_ffdc.robot
12
13Suite Setup Suite Setup Execution
14
15Test 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 Keishing4f37a7e2018-09-22 13:08:35 -050026Host Multi Code Update
Charles Paul Hofer862685c2017-09-19 17:09:19 -050027 [Documentation] Do four code updates in a row. Update to N, N-1, N, and
28 ... then N+1.
George Keishing4f37a7e2018-09-22 13:08:35 -050029 [Tags] Host_Multi_Code_Update
Charles Paul Hofer862685c2017-09-19 17:09:19 -050030 [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
41Suite 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
54Code 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