blob: 71d5e5f3ca649bb0090b9b73a36d696cb2e97cc6 [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
George Keishingfcc6d782018-01-24 00:44:03 -06008Test Setup Test Setup Execution
George Keishing2f0f4b32018-01-21 23:25:47 -06009Test Teardown Test Teardown Execution
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 -050030Check For Application Failures
31 [Documentation] Parse the journal log and check for failures.
32 [Tags] Check_For_Application_Failures
33
34 Open Connection And Log In
35
36 ${journal_log}= Execute Command On BMC
37 ... journalctl --no-pager | egrep '${ERROR_REGEX}'
38
39 Should Be Empty ${journal_log}
40
George Keishing97e96532016-10-06 12:44:52 -050041*** Keywords ***
George Keishing0a46d022017-01-30 08:11:43 -060042
George Keishingfcc6d782018-01-24 00:44:03 -060043Test Setup Execution
44 [Documentation] Do test case setup tasks.
45 Start SOL Console Logging
46 Set Auto Reboot ${0}
47
George Keishing2f0f4b32018-01-21 23:25:47 -060048Test Teardown Execution
George Keishing0a46d022017-01-30 08:11:43 -060049 [Documentation] Collect FFDC and SOL log.
Gunnar Millseac1af22016-11-14 15:30:09 -060050 FFDC On Test Case Fail
George Keishing97e96532016-10-06 12:44:52 -050051 ${sol_log}= Stop SOL Console Logging
52 Log ${sol_log}
George Keishing2f0f4b32018-01-21 23:25:47 -060053 Set Auto Reboot ${1}
George Keishing0af24412017-03-10 13:33:23 -060054
55Host Off And On
56 [Documentation] Verify power off and on.
57
58 Initiate Host PowerOff
George Keishing0af24412017-03-10 13:33:23 -060059
60 Initiate Host Boot
George Keishing383d29b2017-03-25 11:10:52 -050061
George Keishing5f2f7f52017-06-30 09:17:53 -050062 # TODO: Host shutdown race condition.
63 # Wait 30 seconds before Powering Off.
64 Sleep 30s