blob: d6427a9841dc506e7c49c281b2e801536701b93e [file] [log] [blame]
Chris Austenb29d2e82016-06-07 12:25:35 -05001*** Settings ***
2Documentation This suite is for testing OCC: Power capping setting
3
4Resource ../lib/rest_client.robot
5Resource ../lib/utils.robot
George Keishing4d6c1da2016-07-15 05:51:22 -05006Resource ../lib/connection_client.robot
George Keishingd55a4be2016-08-26 03:28:17 -05007Resource ../lib/openbmc_ffdc.robot
Chris Austenb29d2e82016-06-07 12:25:35 -05008
causten147f5752016-08-11 16:24:45 -05009Force Tags bmcreboot
10
George Keishing4d6c1da2016-07-15 05:51:22 -050011Suite Setup Open Connection And Log In
12Suite Teardown Close All Connections
Gunnar Millseac1af22016-11-14 15:30:09 -060013Test Teardown FFDC On Test Case Fail
Chris Austenb29d2e82016-06-07 12:25:35 -050014
15*** Variables ***
16${SYSTEM_SHUTDOWN_TIME} ${5}
17
18*** Test Cases ***
19
20Test WarmReset via REST
Rahul Maheshwari08fd6172016-09-21 12:04:43 -050021 [Documentation] This testcase is to verify warm reset using REST.
22 ... Existing Issue: https://github.com/openbmc/openbmc/issues/519
23 [Tags] known_issue
24
Chris Austenb29d2e82016-06-07 12:25:35 -050025 ${warm_test_file}= Set Variable /tmp/before_warmreset
26 Open Connection And Log In
George Keishing4b831932016-09-09 04:18:21 -050027 ${stdout} ${stderr} ${rc}=
28 ... Execute Command touch ${warm_test_file}
29 ... return_stderr=True return_rc=True
30 Should Be Equal ${rc} ${0} Unable to create file - ${warm_test_file}
Chris Austenb29d2e82016-06-07 12:25:35 -050031
George Keishing4b831932016-09-09 04:18:21 -050032 Trigger Warm Reset
33 ${max_wait_time}=
34 ... Evaluate ${SYSTEM_SHUTDOWN_TIME}+${OPENBMC_REBOOT_TIMEOUT}
Chris Austenb29d2e82016-06-07 12:25:35 -050035
36 Open Connection And Log In
George Keishing4b831932016-09-09 04:18:21 -050037 ${uptime}=
38 ... Execute Command cut -d " " -f 1 /proc/uptime| cut -d "." -f 1
Chris Austenb29d2e82016-06-07 12:25:35 -050039 ${uptime}= Convert To Integer ${uptime}
40 ${uptime}= Evaluate ${uptime}/60
41 Should Be True ${uptime}<${max_wait_time}
42 Open Connection And Log In
George Keishing4b831932016-09-09 04:18:21 -050043 ${stdout} ${stderr} ${rc}=
44 ... Execute Command ls ${warm_test_file}
45 ... return_stderr=True return_rc=True
46 Should Be Equal ${rc} ${1}
47 ... File ${warm_test_file} persist after BMC rebooted
Chris Austenb29d2e82016-06-07 12:25:35 -050048
49*** Keywords ***