blob: a4b159077822d36243f761f5210f07639f77a086 [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 Keishing5e870cd2016-08-24 10:05:47 -050028
29*** Variables ***
30
31${FILE_PATH} ${EMPTY}
32
Gunnar Mills7c8923f2016-12-12 21:19:52 -060033*** Test Cases ***
George Keishing5e870cd2016-08-24 10:05:47 -050034
35Initiate Code update BMC
36 [Documentation] BMC code update process initiation
37
38 Check If File Exist ${FILE_PATH}
39 System Readiness Test
George Keishing50787fc2016-09-21 03:44:26 -050040 ${status}= Run Keyword and Return Status
41 ... Validate BMC Version before
42
43 Run Keyword if '${status}' == '${False}'
44 ... Pass Execution Same Driver version installed
45
George Keishing0bd59f12016-12-14 10:39:21 -060046 Prune Journal Log
George Keishingdc5aa58e92016-09-27 01:35:11 -050047 Initiate Power Off
Rahul Maheshwari4c1b99f2016-12-19 17:52:04 -060048 Run Keyword And Ignore Error
49 ... Set Policy Setting RESTORE_LAST_STATE
George Keishingdc5aa58e92016-09-27 01:35:11 -050050 Prepare For Update
Rahul Maheshwarid0fd8832016-10-14 03:15:51 -050051
52 # Wait time is increased temporary to 10 mins due
53 # to openbmc/openbmc#673
54 Check If BMC is Up 10 min 10 sec
George Keishing5e870cd2016-08-24 10:05:47 -050055
George Keishing8db0e1b2016-10-20 13:46:54 -050056 @{states}= Create List BMC_READY HOST_POWERED_OFF
George Keishing1b150202016-09-29 08:51:58 -050057 Wait Until Keyword Succeeds
George Keishing8db0e1b2016-10-20 13:46:54 -050058 ... 10 min 10 sec Verify BMC State ${states}
George Keishing1b150202016-09-29 08:51:58 -050059
George Keishing2582bee2016-11-17 21:41:49 -060060 # TODO: openbmc/openbmc#815
61 Sleep 1 min
62
George Keishing5e870cd2016-08-24 10:05:47 -050063 Preserve BMC Network Setting
64 SCP Tar Image File to BMC ${FILE_PATH}
65
66 Activate BMC flash image
67
George Keishingb3700812016-08-31 03:03:30 -050068 Run Keyword And Ignore Error Trigger Warm Reset
George Keishingf68c9eb2016-12-01 08:09:58 -060069 # Warm reset adds 3 seconds delay before forcing reboot
70 # To minimize race conditions, we wait for 7 seconds
71 Sleep 7s
George Keishing5e870cd2016-08-24 10:05:47 -050072 ${session_active}= Check If warmReset is Initiated
73 Run Keyword If '${session_active}' == '${True}'
74 ... Trigger Warm Reset via Reboot
75
George Keishingc4d3dc02016-09-19 03:45:55 -050076 Check If BMC is Up 30 min 10 sec
George Keishing5e870cd2016-08-24 10:05:47 -050077 Sleep 1 min
78 Validate BMC Version
Sivas SRRea85d1f2016-11-13 22:44:28 -060079 Wait Until Keyword Succeeds
80 ... 10 min 10 sec Verify BMC State BMC_READY
81
82Test BMC CPU Mem Performance at Ready State
George Keishing128643a2016-12-15 11:36:46 -060083 [Documentation] Check performance of memory and BMC CPU.
84 Open Connection And Log In
Sivas SRRea85d1f2016-11-13 22:44:28 -060085 Check BMC CPU Performance
86 Check BMC Mem Performance