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 | |
Rahul Maheshwari | 06174f2 | 2017-03-06 03:17:09 -0600 | [diff] [blame] | 8 | Test Setup Open Connection And Log In |
| 9 | Test Teardown Post Test Case Execution |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 10 | |
| 11 | *** Variables *** |
| 12 | ${devicetree_base} /sys/firmware/devicetree/base/ |
| 13 | |
| 14 | *** Test Cases *** |
| 15 | Check BMC Model Property Is Set |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 16 | [Documentation] Verify if the BMC Model is populated in the device tree. |
| 17 | [Tags] Check_BMC_Model_Property_Is_Set |
| 18 | [Template] Template Check Property |
| 19 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 20 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 21 | model |
| 22 | |
| 23 | |
| 24 | Check BMC Name Property Is Set |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 25 | [Documentation] Verify if the BMC name property is populated. |
| 26 | [Tags] Check_BMC_Name_Property_Is_Set |
| 27 | [Template] Template Check Property |
| 28 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 29 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 30 | name |
| 31 | |
| 32 | |
| 33 | Check BMC Compatible Property Is Set |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 34 | [Documentation] Verify if the BMC compatible property is populated. |
| 35 | [Tags] Check_BMC_Compatible_Property_Is_Set |
| 36 | [Template] Template Check Property |
| 37 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 38 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 39 | compatible |
| 40 | |
| 41 | |
| 42 | Check BMC CPU Name Property Is Set |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 43 | [Documentation] Verify if the BMC CPU name property is populated. |
| 44 | [Tags] Check_BMC_CPU_Name_Property_Is_Set |
| 45 | [Template] Template Check Property |
| 46 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 47 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 48 | cpus/name |
| 49 | |
| 50 | |
| 51 | Check BMC CPU Compatible Property Is Set |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 52 | [Documentation] Verify if the BMC CPU compatible property is populated. |
| 53 | [Tags] Check_BMC_CPU_Compatible_Property_Is_Set |
| 54 | [Template] Template Check Property |
| 55 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 56 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 57 | cpus/cpu@0/compatible |
| 58 | |
| 59 | |
| 60 | Check BMC Memory Name Property Is Set |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 61 | [Documentation] Verify if the BMC Memory name property is populated. |
| 62 | [Tags] Check_BMC_Memory_Name_Property_Is_Set |
| 63 | [Template] Template Check Property |
| 64 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 65 | #Property |
Sivas SRR | d3b515b | 2019-01-15 23:31:35 -0600 | [diff] [blame] | 66 | memory@80000000/name |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 67 | |
| 68 | |
| 69 | Check BMC Memory Device Type Property Is Set |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 70 | [Documentation] Verify if the BMC Memory Device Type property is |
| 71 | ... populated. |
| 72 | [Tags] Check_BMC_Memory_Device_Type_Property_Is_Set |
| 73 | [Template] Template Check Property |
| 74 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 75 | #Property |
Sivas SRR | d3b515b | 2019-01-15 23:31:35 -0600 | [diff] [blame] | 76 | memory@80000000/device_type |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 77 | |
| 78 | |
| 79 | Check BMC FSI Name Property Is Set |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 80 | [Documentation] Verify if the BMC FSI name property is populated. |
| 81 | [Tags] Check_BMC_FSI_Name_Property_Is_Set |
| 82 | [Template] Template Check Property |
| 83 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 84 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 85 | fsi-master/name |
| 86 | |
| 87 | |
| 88 | Check BMC FSI Compatible Property Is Set |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 89 | [Documentation] Verify if the BMC FSI compatible property is populated. |
| 90 | [Tags] Check_BMC_FSI_Compatible_Property_Is_Set |
| 91 | [Template] Template Check Property |
| 92 | |
Sivas SRR | 01c7dc3 | 2017-06-24 02:24:23 -0500 | [diff] [blame] | 93 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 94 | fsi-master/compatible |
| 95 | |
| 96 | |
| 97 | Check BMC GPIO-FSI Name Property Is Set |
Sivas SRR | 01c7dc3 | 2017-06-24 02:24:23 -0500 | [diff] [blame] | 98 | [Documentation] Verify if the BMC GPIO-FSI name property is populated. |
| 99 | [Tags] Check_BMC_GPIO_FSI_Name_Property_Is_Set |
| 100 | [Template] Template Check Property |
| 101 | |
Sivas SRR | 01c7dc3 | 2017-06-24 02:24:23 -0500 | [diff] [blame] | 102 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 103 | gpio-fsi/name |
| 104 | |
| 105 | |
| 106 | Check BMC GPIO-FSI Compatible Property Is Set |
Sivas SRR | 01c7dc3 | 2017-06-24 02:24:23 -0500 | [diff] [blame] | 107 | [Documentation] Verify if the BMC GPIO-FSI compatible property is populated. |
| 108 | [Tags] Check_BMC_GPIO_FSI_Compatible_Property_Is_Set |
| 109 | [Template] Template Check Property |
| 110 | |
Sivas SRR | fbe34dd | 2017-06-29 11:03:12 -0500 | [diff] [blame] | 111 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 112 | gpio-fsi/compatible |
| 113 | |
| 114 | |
| 115 | Check BMC GPIO-keys Name Property Is Set |
Sivas SRR | fbe34dd | 2017-06-29 11:03:12 -0500 | [diff] [blame] | 116 | [Documentation] Verify if the BMC GPIO-keys name property is |
| 117 | ... populated. |
| 118 | [Tags] Check_BMC_GPIO_keys_Name_Property_Is_Set |
| 119 | [Template] Template Check Property |
| 120 | |
Sivas SRR | fbe34dd | 2017-06-29 11:03:12 -0500 | [diff] [blame] | 121 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 122 | gpio-keys/name |
| 123 | |
| 124 | |
| 125 | Check BMC GPIO-keys Compatible Property Is Set |
Sivas SRR | fbe34dd | 2017-06-29 11:03:12 -0500 | [diff] [blame] | 126 | [Documentation] Verify if the BMC GPIO-keys compatible property is |
| 127 | ... populated. |
| 128 | [Tags] Check_BMC_GPIO_keys_Compatible_Property_Is_Set |
| 129 | [Template] Template Check Property |
| 130 | |
Sivas SRR | fbe34dd | 2017-06-29 11:03:12 -0500 | [diff] [blame] | 131 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 132 | gpio-keys/compatible |
| 133 | |
| 134 | |
| 135 | Check BMC IIO-HWMON Name Property Is Set |
Sivas SRR | f4f533b | 2017-07-30 11:42:12 -0500 | [diff] [blame] | 136 | [Documentation] Verify if the BMC IIO-HWMON-DPS310 name property is |
Sivas SRR | fbe34dd | 2017-06-29 11:03:12 -0500 | [diff] [blame] | 137 | ... populated. |
| 138 | [Tags] Check_BMC_IIO-HWMON_Name_Property_Is_Set |
| 139 | [Template] Template Check Property |
| 140 | |
Sivas SRR | fbe34dd | 2017-06-29 11:03:12 -0500 | [diff] [blame] | 141 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 142 | iio-hwmon-dps310/name |
| 143 | |
| 144 | |
| 145 | Check BMC IIO-HWMON Compatible Property Is Set |
Sivas SRR | f4f533b | 2017-07-30 11:42:12 -0500 | [diff] [blame] | 146 | [Documentation] Verify if the BMC IIO-HWMON-DPS310 compatible property is |
Sivas SRR | fbe34dd | 2017-06-29 11:03:12 -0500 | [diff] [blame] | 147 | ... populated. |
| 148 | [Tags] Check_BMC_IIO-HWMON_Compatible_Property_Is_Set |
| 149 | [Template] Template Check Property |
| 150 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 151 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 152 | iio-hwmon-dps310/compatible |
| 153 | |
| 154 | |
| 155 | Check BMC LED Name Property Is Set |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 156 | [Documentation] Verify if the BMC LED name property is populated. |
| 157 | [Tags] Check_BMC_LED_Name_Property_Is_Set |
| 158 | [Template] Template Check Property |
| 159 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 160 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 161 | leds/name |
| 162 | |
| 163 | |
| 164 | Check BMC LED Compatible Property Is Set |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 165 | [Documentation] Verify if the BMC LED compatible property is populated. |
| 166 | [Tags] Check_BMC_LED_Compatible_Property_Is_Set |
| 167 | [Template] Template Check Property |
| 168 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 169 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 170 | leds/compatible |
| 171 | |
| 172 | |
| 173 | Check BMC Clocks Name Property Is Set |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 174 | [Documentation] Verify if the BMC clocks name property is populated. |
| 175 | [Tags] Check_BMC_Clocks_Name_Property_Is_Set |
| 176 | [Template] Template Check Property |
| 177 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 178 | #Property |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 179 | clocks/name |
| 180 | |
| 181 | |
| 182 | Check BMC Clocks Compatible Property Is Set |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 183 | [Documentation] Verify if the BMC clocks compatible property is populated. |
| 184 | [Tags] Check_BMC_Clocks_Compatible_Property_Is_Set |
| 185 | [Template] Template Check Property |
| 186 | |
George Keishing | 5abfe60 | 2018-07-05 11:54:37 -0500 | [diff] [blame] | 187 | #Property |
| 188 | clocks/clk_clkin/compatible |
| 189 | |
| 190 | |
Sivas SRR | 8103794 | 2017-01-26 06:48:20 -0600 | [diff] [blame] | 191 | *** Keywords *** |
| 192 | |
| 193 | Template Check Property |
| 194 | [Documentation] Check for the existence of a property in the device tree. |
| 195 | [Arguments] ${property} |
| 196 | #property: Value of Property |
| 197 | |
| 198 | ${devicetree_path}= Catenate SEPARATOR= |
| 199 | ... ${devicetree_base} ${property} |
| 200 | ${output} ${stderr}= Execute Command cat ${devicetree_path} |
| 201 | ... return_stderr=True |
| 202 | Should Be Empty ${stderr} |
| 203 | ${length}= Get Length ${output} |
| 204 | Should Be True ${length} > 1 |
Rahul Maheshwari | 06174f2 | 2017-03-06 03:17:09 -0600 | [diff] [blame] | 205 | |
| 206 | Post Test Case Execution |
| 207 | [Documentation] Do the post test teardown. |
| 208 | ... 1. Capture FFDC on test failure. |
| 209 | ... 2. Close all open SSH connections. |
| 210 | |
| 211 | FFDC On Test Case Fail |
| 212 | Close All Connections |