blob: ec983eaf27c34032d0bdfb6a76d8618aa6cbf67f [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 Keishing97e96532016-10-06 12:44:52 -05007
8Test Setup Start SOL Console Logging
9Test Teardown Test Exit Logs
George Keishing83ada4f2016-08-09 03:15:08 -050010
causten147f5752016-08-11 16:24:45 -050011Force Tags chassisboot
George Keishingeefc07a2016-07-26 03:25:35 -050012
George Keishing0af24412017-03-10 13:33:23 -060013*** Variables ***
14
15# User may pass LOOP_COUNT.
16# By default 2 cycle for CI/CT.
17${LOOP_COUNT} ${2}
18
George Keishing32ed4122017-05-13 03:06:39 -050019# Error strings to check from journald.
20${ERROR_REGEX} SEGV|core-dump
21
Gunnar Mills7c8923f2016-12-12 21:19:52 -060022*** Test Cases ***
George Keishingeefc07a2016-07-26 03:25:35 -050023
George Keishing0a46d022017-01-30 08:11:43 -060024Power On Test
25 [Documentation] Power off and on.
26 [Tags] Power_On_Test
Sweta Potthuri4aa35692017-10-31 03:57:39 -050027 [Setup] Set Auto Reboot ${0}
28 [Teardown] Set Auto Reboot ${1}
George Keishingeefc07a2016-07-26 03:25:35 -050029
George Keishing0af24412017-03-10 13:33:23 -060030 Repeat Keyword ${LOOP_COUNT} times Host Off And On
George Keishing97e96532016-10-06 12:44:52 -050031
George Keishing32ed4122017-05-13 03:06:39 -050032Check For Application Failures
33 [Documentation] Parse the journal log and check for failures.
34 [Tags] Check_For_Application_Failures
35
36 Open Connection And Log In
37
38 ${journal_log}= Execute Command On BMC
39 ... journalctl --no-pager | egrep '${ERROR_REGEX}'
40
41 Should Be Empty ${journal_log}
42
George Keishing97e96532016-10-06 12:44:52 -050043*** Keywords ***
George Keishing0a46d022017-01-30 08:11:43 -060044
George Keishing97e96532016-10-06 12:44:52 -050045Test Exit Logs
George Keishing0a46d022017-01-30 08:11:43 -060046 [Documentation] Collect FFDC and SOL log.
Gunnar Millseac1af22016-11-14 15:30:09 -060047 FFDC On Test Case Fail
George Keishing97e96532016-10-06 12:44:52 -050048 ${sol_log}= Stop SOL Console Logging
49 Log ${sol_log}
George Keishing0af24412017-03-10 13:33:23 -060050
51Host Off And On
52 [Documentation] Verify power off and on.
53
54 Initiate Host PowerOff
George Keishing0af24412017-03-10 13:33:23 -060055
56 Initiate Host Boot
George Keishing383d29b2017-03-25 11:10:52 -050057
George Keishing5f2f7f52017-06-30 09:17:53 -050058 # TODO: Host shutdown race condition.
59 # Wait 30 seconds before Powering Off.
60 Sleep 30s