blob: 53662657d46461cf1a7ee00671e2e2ee701d7fea [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
26Host_Multi Code Update
27 [Documentation] Do four code updates in a row. Update to N, N-1, N, and
28 ... then N+1.
29 [Tags] Host_Mult_Code_Update
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
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