blob: 205264fbc9cfc996f2275acb9ae08ea886353991 [file] [log] [blame]
George Keishing5e870cd2016-08-24 10:05:47 -05001*** Settings ***
2Documentation 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 Keishing8db0e1b2016-10-20 13:46:54 -050011... - 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 Keishingdc5aa58e92016-09-27 01:35:11 -050014... - Issue poweroff
George Keishing0bd59f12016-12-14 10:39:21 -060015... - Prune archived journal logs
George Keishingdc5aa58e92016-09-27 01:35:11 -050016... - Prepare for Update
George Keishingdc5aa58e92016-09-27 01:35:11 -050017... - Wait for BMC to come online clean
George Keishing1b150202016-09-29 08:51:58 -050018... - Wait for BMC_READY state
George Keishing5e870cd2016-08-24 10:05:47 -050019... - 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
26Resource code_update_utils.robot
George Keishing8db0e1b2016-10-20 13:46:54 -050027Resource ../../lib/boot/boot_resource_master.robot
George Keishing43a021f2017-01-30 11:10:13 -060028Resource ../../lib/state_manager.robot
George Keishing5e870cd2016-08-24 10:05:47 -050029
30*** Variables ***
31
32${FILE_PATH} ${EMPTY}
33
Gunnar Mills7c8923f2016-12-12 21:19:52 -060034*** Test Cases ***
George Keishing5e870cd2016-08-24 10:05:47 -050035
Sivas SRRaca55712016-12-21 04:32:35 -060036Test Basic BMC Performance Before Code Update
37 [Documentation] Check performance of memory, CPU & file system of BMC.
38 [Tags] Test_Basic_BMC_Performance_Before_Code_Update
39 Open Connection And Log In
40 Check BMC CPU Performance
41 Check BMC Mem Performance
42 Check BMC File System Performance
43
44Initiate Code Update BMC
George Keishing43a021f2017-01-30 11:10:13 -060045 [Documentation] BMC code update process initiation
46 [Setup] Set State Interface Version
Sivas SRRaca55712016-12-21 04:32:35 -060047 [Tags] Initiate_Code_Update_BMC
George Keishing5e870cd2016-08-24 10:05:47 -050048
George Keishing43a021f2017-01-30 11:10:13 -060049 Check If File Exist ${FILE_PATH}
George Keishing5e870cd2016-08-24 10:05:47 -050050 System Readiness Test
George Keishing50787fc2016-09-21 03:44:26 -050051 ${status}= Run Keyword and Return Status
52 ... Validate BMC Version before
53
54 Run Keyword if '${status}' == '${False}'
55 ... Pass Execution Same Driver version installed
56
George Keishing0bd59f12016-12-14 10:39:21 -060057 Prune Journal Log
George Keishing43a021f2017-01-30 11:10:13 -060058 Power Off Request
Rahul Maheshwari4c1b99f2016-12-19 17:52:04 -060059 Run Keyword And Ignore Error
60 ... Set Policy Setting RESTORE_LAST_STATE
George Keishingdc5aa58e92016-09-27 01:35:11 -050061 Prepare For Update
Rahul Maheshwarid0fd8832016-10-14 03:15:51 -050062
63 # Wait time is increased temporary to 10 mins due
64 # to openbmc/openbmc#673
65 Check If BMC is Up 10 min 10 sec
George Keishing5e870cd2016-08-24 10:05:47 -050066
George Keishing43a021f2017-01-30 11:10:13 -060067 Wait For BMC Ready
George Keishing1b150202016-09-29 08:51:58 -050068
George Keishing2582bee2016-11-17 21:41:49 -060069 # TODO: openbmc/openbmc#815
70 Sleep 1 min
71
George Keishing5e870cd2016-08-24 10:05:47 -050072 Preserve BMC Network Setting
73 SCP Tar Image File to BMC ${FILE_PATH}
74
75 Activate BMC flash image
76
George Keishingb3700812016-08-31 03:03:30 -050077 Run Keyword And Ignore Error Trigger Warm Reset
George Keishingf68c9eb2016-12-01 08:09:58 -060078 # Warm reset adds 3 seconds delay before forcing reboot
79 # To minimize race conditions, we wait for 7 seconds
80 Sleep 7s
George Keishing5e870cd2016-08-24 10:05:47 -050081 ${session_active}= Check If warmReset is Initiated
82 Run Keyword If '${session_active}' == '${True}'
83 ... Trigger Warm Reset via Reboot
84
George Keishingc4d3dc02016-09-19 03:45:55 -050085 Check If BMC is Up 30 min 10 sec
George Keishing5e870cd2016-08-24 10:05:47 -050086 Sleep 1 min
87 Validate BMC Version
George Keishing43a021f2017-01-30 11:10:13 -060088
89 # Now that the code update is completed, make sure we use the correct
90 # interface while checking for BMC ready state.
91 Set State Interface Version
92 Wait For BMC Ready
Sivas SRRea85d1f2016-11-13 22:44:28 -060093
Sivas SRRaca55712016-12-21 04:32:35 -060094
95Test Basic BMC Performance At Ready State
96 [Documentation] Check performance of memory, CPU & file system of BMC.
97 [Tags] Test_Basic_BMC_Performance_At_Ready_State
George Keishing128643a2016-12-15 11:36:46 -060098 Open Connection And Log In
Sivas SRRea85d1f2016-11-13 22:44:28 -060099 Check BMC CPU Performance
100 Check BMC Mem Performance
Sivas SRRaca55712016-12-21 04:32:35 -0600101 Check BMC File System Performance
102