blob: 0384ba1b42cc612a7ae105634ce4eb7848504891 [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
Michael Tritz96ed2772018-01-17 15:38:38 -06008Resource ../lib/ipmi_client.robot
George Keishing97e96532016-10-06 12:44:52 -05009
George Keishingfcc6d782018-01-24 00:44:03 -060010Test Setup Test Setup Execution
George Keishing2f0f4b32018-01-21 23:25:47 -060011Test Teardown Test Teardown Execution
George Keishing83ada4f2016-08-09 03:15:08 -050012
causten147f5752016-08-11 16:24:45 -050013Force Tags chassisboot
George Keishingeefc07a2016-07-26 03:25:35 -050014
George Keishing0af24412017-03-10 13:33:23 -060015*** Variables ***
16
17# User may pass LOOP_COUNT.
18# By default 2 cycle for CI/CT.
19${LOOP_COUNT} ${2}
20
George Keishing32ed4122017-05-13 03:06:39 -050021# Error strings to check from journald.
22${ERROR_REGEX} SEGV|core-dump
23
Gunnar Mills7c8923f2016-12-12 21:19:52 -060024*** Test Cases ***
George Keishingeefc07a2016-07-26 03:25:35 -050025
George Keishing0a46d022017-01-30 08:11:43 -060026Power On Test
27 [Documentation] Power off and on.
28 [Tags] Power_On_Test
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
Michael Tritz96ed2772018-01-17 15:38:38 -060043Test SSH And IPMI Connections
44 [Documentation] Try SSH and IPMI commands to verify each connection.
45 [Tags] Test_SSH_And_IPMI_Connections
46
George Keishing2827c8d2018-03-05 10:43:36 -060047 Check If BMC Is Up 3 min 20 sec
48 Wait Until Keyword Succeeds
49 ... 3 min 30 sec Wait for BMC state Ready
50
Michael Tritz96ed2772018-01-17 15:38:38 -060051 BMC Execute Command true
52 Run IPMI Standard Command chassis status
53
George Keishing97e96532016-10-06 12:44:52 -050054*** Keywords ***
George Keishing0a46d022017-01-30 08:11:43 -060055
George Keishingfcc6d782018-01-24 00:44:03 -060056Test Setup Execution
57 [Documentation] Do test case setup tasks.
58 Start SOL Console Logging
59 Set Auto Reboot ${0}
60
George Keishing2f0f4b32018-01-21 23:25:47 -060061Test Teardown Execution
George Keishing0a46d022017-01-30 08:11:43 -060062 [Documentation] Collect FFDC and SOL log.
Gunnar Millseac1af22016-11-14 15:30:09 -060063 FFDC On Test Case Fail
George Keishing97e96532016-10-06 12:44:52 -050064 ${sol_log}= Stop SOL Console Logging
65 Log ${sol_log}
George Keishing2f0f4b32018-01-21 23:25:47 -060066 Set Auto Reboot ${1}
George Keishing0af24412017-03-10 13:33:23 -060067
68Host Off And On
69 [Documentation] Verify power off and on.
70
71 Initiate Host PowerOff
George Keishing0af24412017-03-10 13:33:23 -060072
73 Initiate Host Boot
George Keishing766c6232018-02-02 11:42:55 -060074 Verify OCC State
George Keishing383d29b2017-03-25 11:10:52 -050075
George Keishing5f2f7f52017-06-30 09:17:53 -050076 # TODO: Host shutdown race condition.
77 # Wait 30 seconds before Powering Off.
78 Sleep 30s