Charles Paul Hofer | f45e5ee | 2017-10-04 12:15:48 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Test BMC field mode. |
| 3 | |
| 4 | Variables ../../data/variables.py |
| 5 | Resource ../../lib/boot_utils.robot |
| 6 | Resource ../../lib/rest_client.robot |
| 7 | Resource ../../lib/openbmc_ffdc.robot |
George Keishing | fb76203 | 2017-11-14 11:18:21 -0600 | [diff] [blame] | 8 | Resource ../../lib/code_update_utils.robot |
Charles Paul Hofer | f45e5ee | 2017-10-04 12:15:48 -0500 | [diff] [blame] | 9 | |
| 10 | Suite Setup Suite Setup Execution |
| 11 | Suite Teardown Suite Teardown Execution |
| 12 | |
| 13 | Test Teardown FFDC On Test Case Fail |
| 14 | |
| 15 | *** Test Cases *** |
| 16 | |
George Keishing | fb76203 | 2017-11-14 11:18:21 -0600 | [diff] [blame] | 17 | Verify Software Field Mode |
| 18 | [Documentation] Verify software field mode is set. |
| 19 | [Tags] Verify_Software_Field_Mode |
Charles Paul Hofer | f45e5ee | 2017-10-04 12:15:48 -0500 | [diff] [blame] | 20 | |
| 21 | # After running, /xyz/openbmc_project/software should look like this: |
| 22 | # /xyz/openbmc_project/software |
| 23 | # { |
| 24 | # "FieldModeEnabled": 1, |
| 25 | # "associations": [ |
| 26 | # [ |
| 27 | # "active", |
| 28 | # "software_version", |
| 29 | # "/xyz/openbmc_project/software/fcf8e182" |
| 30 | # ], |
| 31 | # [ |
| 32 | # "functional", |
Gunnar Mills | af472ce | 2018-02-27 16:08:27 -0600 | [diff] [blame] | 33 | # "functional", |
Charles Paul Hofer | f45e5ee | 2017-10-04 12:15:48 -0500 | [diff] [blame] | 34 | # "/xyz/openbmc_project/software/fcf8e182" |
| 35 | # ] |
| 36 | # ] |
| 37 | # } |
| 38 | |
George Keishing | fb76203 | 2017-11-14 11:18:21 -0600 | [diff] [blame] | 39 | Enable Field Mode And Verify Unmount |
Charles Paul Hofer | f45e5ee | 2017-10-04 12:15:48 -0500 | [diff] [blame] | 40 | |
| 41 | |
George Keishing | 4d4ef99 | 2021-01-28 09:56:53 -0600 | [diff] [blame^] | 42 | Attempt To Disable Field Mode Via REST And Verify |
Charles Paul Hofer | f45e5ee | 2017-10-04 12:15:48 -0500 | [diff] [blame] | 43 | [Documentation] Attempt to disable field mode with REST and verify that |
| 44 | ... it remains enabled. |
| 45 | [Tags] Attempt_To_Disable_Field_Mode_Via_REST |
| 46 | |
| 47 | # This test case doesn't actually disable field mode. It attempts to, but |
| 48 | # verifies that the FieldModeEnabled property keeps its value of '1' |
| 49 | # after trying to set it to '0'. Field mode is disabled in suite teardown. |
| 50 | |
| 51 | ${args}= Create Dictionary data=${0} |
| 52 | Write Attribute ${SOFTWARE_VERSION_URI} FieldModeEnabled |
| 53 | ... verify=${TRUE} expected_value=${1} data=${args} |
| 54 | |
| 55 | |
| 56 | *** Keywords *** |
| 57 | |
| 58 | Suite Setup Execution |
| 59 | [Documentation] Do suite setup tasks. |
| 60 | |
| 61 | # Check that /usr/local is mounted |
| 62 | BMC Execute Command [ -d "/usr/local/share" ] |
| 63 | |
| 64 | |
| 65 | Suite Teardown Execution |
| 66 | [Documentation] Do suite teardown tasks. |
| 67 | |
| 68 | # 1. Disable field mode |
| 69 | # 2. Check that /usr/local is mounted |
| 70 | |
George Keishing | ef97f3f | 2017-11-15 10:32:59 -0600 | [diff] [blame] | 71 | Disable Field Mode And Verify Unmount |