blob: 5fbfa182cc608afa866bab6d852f7ea2763206aa [file] [log] [blame]
George Keishingeefc07a2016-07-26 03:25:35 -05001*** Settings ***
George Keishing0a46d022017-01-30 08:11:43 -06002Documentation Test power on for HW CI.
George Keishingeefc07a2016-07-26 03:25:35 -05003
George Keishingd55a4be2016-08-26 03:28:17 -05004Resource ../lib/openbmc_ffdc.robot
George Keishing97e96532016-10-06 12:44:52 -05005Resource ../lib/utils.robot
George Keishing0a46d022017-01-30 08:11:43 -06006Resource ../lib/state_manager.robot
George Keishing766c6232018-02-02 11:42:55 -06007Resource ../lib/open_power_utils.robot
George Keishing97e96532016-10-06 12:44:52 -05008
George Keishingfcc6d782018-01-24 00:44:03 -06009Test Setup Test Setup Execution
George Keishing2f0f4b32018-01-21 23:25:47 -060010Test Teardown Test Teardown Execution
George Keishing83ada4f2016-08-09 03:15:08 -050011
causten147f5752016-08-11 16:24:45 -050012Force Tags chassisboot
George Keishingeefc07a2016-07-26 03:25:35 -050013
George Keishing0af24412017-03-10 13:33:23 -060014*** Variables ***
15
16# User may pass LOOP_COUNT.
17# By default 2 cycle for CI/CT.
18${LOOP_COUNT} ${2}
19
George Keishing32ed4122017-05-13 03:06:39 -050020# Error strings to check from journald.
21${ERROR_REGEX} SEGV|core-dump
22
Gunnar Mills7c8923f2016-12-12 21:19:52 -060023*** Test Cases ***
George Keishingeefc07a2016-07-26 03:25:35 -050024
George Keishing0a46d022017-01-30 08:11:43 -060025Power On Test
26 [Documentation] Power off and on.
27 [Tags] Power_On_Test
George Keishingeefc07a2016-07-26 03:25:35 -050028
George Keishing0af24412017-03-10 13:33:23 -060029 Repeat Keyword ${LOOP_COUNT} times Host Off And On
George Keishing97e96532016-10-06 12:44:52 -050030
George Keishing32ed4122017-05-13 03:06:39 -050031Check For Application Failures
32 [Documentation] Parse the journal log and check for failures.
33 [Tags] Check_For_Application_Failures
34
35 Open Connection And Log In
36
37 ${journal_log}= Execute Command On BMC
38 ... journalctl --no-pager | egrep '${ERROR_REGEX}'
39
40 Should Be Empty ${journal_log}
41
George Keishing97e96532016-10-06 12:44:52 -050042*** Keywords ***
George Keishing0a46d022017-01-30 08:11:43 -060043
George Keishingfcc6d782018-01-24 00:44:03 -060044Test Setup Execution
45 [Documentation] Do test case setup tasks.
46 Start SOL Console Logging
47 Set Auto Reboot ${0}
48
George Keishing2f0f4b32018-01-21 23:25:47 -060049Test Teardown Execution
George Keishing0a46d022017-01-30 08:11:43 -060050 [Documentation] Collect FFDC and SOL log.
Gunnar Millseac1af22016-11-14 15:30:09 -060051 FFDC On Test Case Fail
George Keishing97e96532016-10-06 12:44:52 -050052 ${sol_log}= Stop SOL Console Logging
53 Log ${sol_log}
George Keishing2f0f4b32018-01-21 23:25:47 -060054 Set Auto Reboot ${1}
George Keishing0af24412017-03-10 13:33:23 -060055
56Host Off And On
57 [Documentation] Verify power off and on.
58
59 Initiate Host PowerOff
George Keishing0af24412017-03-10 13:33:23 -060060
61 Initiate Host Boot
George Keishing766c6232018-02-02 11:42:55 -060062 Verify OCC State
George Keishing383d29b2017-03-25 11:10:52 -050063
George Keishing5f2f7f52017-06-30 09:17:53 -050064 # TODO: Host shutdown race condition.
65 # Wait 30 seconds before Powering Off.
66 Sleep 30s