blob: 667fcd04f0026e7c3e60a8821767a4166403cc3e [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
George Keishingeefc07a2016-07-26 03:25:35 -050027
George Keishing0af24412017-03-10 13:33:23 -060028 Repeat Keyword ${LOOP_COUNT} times Host Off And On
George Keishing97e96532016-10-06 12:44:52 -050029
George Keishing32ed4122017-05-13 03:06:39 -050030
31Check 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 Keishing97e96532016-10-06 12:44:52 -050044Test Exit Logs
George Keishing0a46d022017-01-30 08:11:43 -060045 [Documentation] Collect FFDC and SOL log.
Gunnar Millseac1af22016-11-14 15:30:09 -060046 FFDC On Test Case Fail
George Keishing97e96532016-10-06 12:44:52 -050047 ${sol_log}= Stop SOL Console Logging
48 Log ${sol_log}
George Keishing0af24412017-03-10 13:33:23 -060049
50Host Off And On
51 [Documentation] Verify power off and on.
52
53 Initiate Host PowerOff
George Keishing0af24412017-03-10 13:33:23 -060054
55 Initiate Host Boot
George Keishing383d29b2017-03-25 11:10:52 -050056
George Keishing5f2f7f52017-06-30 09:17:53 -050057 # TODO: Host shutdown race condition.
58 # Wait 30 seconds before Powering Off.
59 Sleep 30s