Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation This suite is for testing OCC: Power capping setting |
| 3 | |
| 4 | Resource ../lib/rest_client.robot |
| 5 | Resource ../lib/utils.robot |
George Keishing | 4d6c1da | 2016-07-15 05:51:22 -0500 | [diff] [blame] | 6 | Resource ../lib/connection_client.robot |
George Keishing | d55a4be | 2016-08-26 03:28:17 -0500 | [diff] [blame] | 7 | Resource ../lib/openbmc_ffdc.robot |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 8 | |
causten | 147f575 | 2016-08-11 16:24:45 -0500 | [diff] [blame] | 9 | Force Tags bmcreboot |
| 10 | |
George Keishing | 4d6c1da | 2016-07-15 05:51:22 -0500 | [diff] [blame] | 11 | Suite Setup Open Connection And Log In |
| 12 | Suite Teardown Close All Connections |
George Keishing | d55a4be | 2016-08-26 03:28:17 -0500 | [diff] [blame] | 13 | Test Teardown Log FFDC |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 14 | |
| 15 | *** Variables *** |
| 16 | ${SYSTEM_SHUTDOWN_TIME} ${5} |
| 17 | |
| 18 | *** Test Cases *** |
| 19 | |
| 20 | Test WarmReset via REST |
Rahul Maheshwari | 08fd617 | 2016-09-21 12:04:43 -0500 | [diff] [blame] | 21 | [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 Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 25 | ${warm_test_file}= Set Variable /tmp/before_warmreset |
| 26 | Open Connection And Log In |
George Keishing | 4b83193 | 2016-09-09 04:18:21 -0500 | [diff] [blame] | 27 | ${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 Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 31 | |
George Keishing | 4b83193 | 2016-09-09 04:18:21 -0500 | [diff] [blame] | 32 | Trigger Warm Reset |
| 33 | ${max_wait_time}= |
| 34 | ... Evaluate ${SYSTEM_SHUTDOWN_TIME}+${OPENBMC_REBOOT_TIMEOUT} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 35 | |
| 36 | Open Connection And Log In |
George Keishing | 4b83193 | 2016-09-09 04:18:21 -0500 | [diff] [blame] | 37 | ${uptime}= |
| 38 | ... Execute Command cut -d " " -f 1 /proc/uptime| cut -d "." -f 1 |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 39 | ${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 Keishing | 4b83193 | 2016-09-09 04:18:21 -0500 | [diff] [blame] | 43 | ${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 Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 48 | |
| 49 | *** Keywords *** |