Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation This suite is for Verifying BMC device tree. |
| 3 | |
| 4 | Resource ../lib/openbmc_ffdc.robot |
| 5 | Resource ../lib/ipmi_client.robot |
| 6 | Library String |
| 7 | |
| 8 | Suite Setup Open Connection And Log In |
| 9 | Suite Teardown Close All Connections |
| 10 | Test Teardown FFDC On Test Case Fail |
| 11 | |
| 12 | *** Variables *** |
| 13 | ${devicetree_base} /sys/firmware/devicetree/base/ |
| 14 | |
| 15 | *** Test Cases *** |
| 16 | Check BMC Model Property Is Set |
| 17 | #Property |
| 18 | model |
| 19 | [Documentation] Verify if the BMC Model is populated in the device tree. |
| 20 | [Tags] Check_BMC_Model_Property_Is_Set |
| 21 | [Template] Template Check Property |
| 22 | |
| 23 | Check BMC Name Property Is Set |
| 24 | #Property |
| 25 | name |
| 26 | [Documentation] Verify if the BMC name property is populated. |
| 27 | [Tags] Check_BMC_Name_Property_Is_Set |
| 28 | [Template] Template Check Property |
| 29 | |
| 30 | Check BMC Compatible Property Is Set |
| 31 | #Property |
| 32 | compatible |
| 33 | [Documentation] Verify if the BMC compatible property is populated. |
| 34 | [Tags] Check_BMC_Compatible_Property_Is_Set |
| 35 | [Template] Template Check Property |
| 36 | |
| 37 | Check BMC CPU Name Property Is Set |
| 38 | #Property |
| 39 | cpus/name |
| 40 | [Documentation] Verify if the BMC CPU name property is populated. |
| 41 | [Tags] Check_BMC_CPU_Name_Property_Is_Set |
| 42 | [Template] Template Check Property |
| 43 | |
| 44 | Check BMC CPU Compatible Property Is Set |
| 45 | #Property |
| 46 | cpus/cpu@0/compatible |
| 47 | [Documentation] Verify if the BMC CPU compatible property is populated. |
| 48 | [Tags] Check_BMC_CPU_Compatible_Property_Is_Set |
| 49 | [Template] Template Check Property |
| 50 | |
| 51 | Check BMC Memory Name Property Is Set |
| 52 | #Property |
| 53 | memory/name |
| 54 | [Documentation] Verify if the BMC Memory name property is populated. |
| 55 | [Tags] Check_BMC_Memory_Name_Property_Is_Set |
| 56 | [Template] Template Check Property |
| 57 | |
| 58 | Check BMC Memory Device Type Property Is Set |
| 59 | #Property |
| 60 | memory/device_type |
| 61 | [Documentation] Verify if the BMC Memory Device Type property is |
| 62 | ... populated. |
| 63 | [Tags] Check_BMC_Memory_Device_Type_Property_Is_Set |
| 64 | [Template] Template Check Property |
| 65 | |
| 66 | Check BMC FSI Name Property Is Set |
| 67 | #Property |
| 68 | fsi-master/name |
| 69 | [Documentation] Verify if the BMC FSI name property is populated. |
| 70 | [Tags] Check_BMC_FSI_Name_Property_Is_Set |
| 71 | [Template] Template Check Property |
| 72 | |
| 73 | Check BMC FSI Compatible Property Is Set |
| 74 | #Property |
| 75 | fsi-master/compatible |
| 76 | [Documentation] Verify if the BMC FSI compatible property is populated. |
| 77 | [Tags] Check_BMC_FSI_Compatible_Property_Is_Set |
| 78 | [Template] Template Check Property |
| 79 | |
| 80 | Check BMC LED Name Property Is Set |
| 81 | #Property |
| 82 | leds/name |
| 83 | [Documentation] Verify if the BMC LED name property is populated. |
| 84 | [Tags] Check_BMC_LED_Name_Property_Is_Set |
| 85 | [Template] Template Check Property |
| 86 | |
| 87 | Check BMC LED Compatible Property Is Set |
| 88 | #Property |
| 89 | leds/compatible |
| 90 | [Documentation] Verify if the BMC LED compatible property is populated. |
| 91 | [Tags] Check_BMC_LED_Compatible_Property_Is_Set |
| 92 | [Template] Template Check Property |
| 93 | |
| 94 | Check BMC Clocks Name Property Is Set |
| 95 | #Property |
| 96 | clocks/name |
| 97 | [Documentation] Verify if the BMC clocks name property is populated. |
| 98 | [Tags] Check_BMC_Clocks_Name_Property_Is_Set |
| 99 | [Template] Template Check Property |
| 100 | |
| 101 | Check BMC Clocks Compatible Property Is Set |
| 102 | #Property |
| 103 | clocks/clk_clkin/compatible |
| 104 | [Documentation] Verify if the BMC clocks compatible property is populated. |
| 105 | [Tags] Check_BMC_Clocks_Compatible_Property_Is_Set |
| 106 | [Template] Template Check Property |
| 107 | |
| 108 | *** Keywords *** |
| 109 | |
| 110 | Template Check Property |
| 111 | [Documentation] Check for the existence of a property in the device tree. |
| 112 | [Arguments] ${property} |
| 113 | #property: Value of Property |
| 114 | |
| 115 | ${devicetree_path}= Catenate SEPARATOR= |
| 116 | ... ${devicetree_base} ${property} |
| 117 | ${output} ${stderr}= Execute Command cat ${devicetree_path} |
| 118 | ... return_stderr=True |
| 119 | Should Be Empty ${stderr} |
| 120 | ${length}= Get Length ${output} |
| 121 | Should Be True ${length} > 1 |