1*** Settings *** 2Documentation This suite is for Verifying BMC device tree. 3 4Resource ../lib/utils.robot 5Resource ../lib/openbmc_ffdc.robot 6Resource ../lib/ipmi_client.robot 7Library String 8 9Test Setup Open Connection And Log In 10Test Teardown Run Keywords Close All Connections AND FFDC On Test Case Fail 11 12Test Tags Test_BMC_Devicetree 13 14*** Variables *** 15${devicetree_base} /sys/firmware/devicetree/base/ 16 17*** Test Cases *** 18Check BMC Model Property Is Set 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 #Property 24 model 25 26 27Check BMC Compatible Property Is Set 28 [Documentation] Verify if the BMC compatible property is populated. 29 [Tags] Check_BMC_Compatible_Property_Is_Set 30 [Template] Template Check Property 31 32 #Property 33 compatible 34 35 36Check BMC CPU Name Property Is Set 37 [Documentation] Verify if the BMC CPU name property is populated. 38 [Tags] Check_BMC_CPU_Name_Property_Is_Set 39 [Template] Template Check Property 40 41 #Property 42 cpus/name 43 44 45Check BMC CPU Compatible Property Is Set 46 [Documentation] Verify if the BMC CPU compatible property is populated. 47 [Tags] Check_BMC_CPU_Compatible_Property_Is_Set 48 [Template] Template Check Property 49 50 #Property 51 cpus/cpu@0/compatible 52 53 54Check BMC Memory Name Property Is Set 55 [Documentation] Verify if the BMC Memory name property is populated. 56 [Tags] Check_BMC_Memory_Name_Property_Is_Set 57 [Template] Template Check Property 58 59 #Property 60 memory@80000000/name 61 62 63Check BMC Memory Device Type Property Is Set 64 [Documentation] Verify if the BMC Memory Device Type property is 65 ... populated. 66 [Tags] Check_BMC_Memory_Device_Type_Property_Is_Set 67 [Template] Template Check Property 68 69 #Property 70 memory@80000000/device_type 71 72 73Check BMC FSI Name Property Is Set 74 [Documentation] Verify if the BMC FSI name property is populated. 75 [Tags] Check_BMC_FSI_Name_Property_Is_Set 76 [Template] Template Check Property 77 78 #Property 79 gpio-fsi/name 80 81 82Check BMC FSI Compatible Property Is Set 83 [Documentation] Verify if the BMC FSI compatible property is populated. 84 [Tags] Check_BMC_FSI_Compatible_Property_Is_Set 85 [Template] Template Check Property 86 87 #Property 88 gpio-fsi/compatible 89 90 91Check BMC GPIO FSI Name Property Is Set 92 [Documentation] Verify if the BMC GPIO-FSI name property is populated. 93 [Tags] Check_BMC_GPIO_FSI_Name_Property_Is_Set 94 [Template] Template Check Property 95 96 #Property 97 gpio-fsi/name 98 99 100Check BMC GPIO FSI Compatible Property Is Set 101 [Documentation] Verify if the BMC GPIO-FSI compatible property is populated. 102 [Tags] Check_BMC_GPIO_FSI_Compatible_Property_Is_Set 103 [Template] Template Check Property 104 105 #Property 106 gpio-fsi/compatible 107 108 109Check BMC GPIO Keys Name Property Is Set 110 [Documentation] Verify if the BMC GPIO-keys name property is 111 ... populated. 112 [Tags] Check_BMC_GPIO_Keys_Name_Property_Is_Set 113 [Template] Template Check Property 114 115 #Property 116 gpio-keys/name 117 118 119Check BMC GPIO Keys Compatible Property Is Set 120 [Documentation] Verify if the BMC GPIO-keys compatible property is 121 ... populated. 122 [Tags] Check_BMC_GPIO_Keys_Compatible_Property_Is_Set 123 [Template] Template Check Property 124 125 #Property 126 gpio-keys/compatible 127 128 129Check BMC IIO-HWMON Name Property Is Set 130 [Documentation] Verify if the BMC IIO-HWMON-DPS310 name property is 131 ... populated. 132 [Tags] Check_BMC_IIO-HWMON_Name_Property_Is_Set 133 [Template] Template Check Property 134 135 #Property 136 iio-hwmon-dps310/name 137 138 139Check BMC IIO-HWMON Compatible Property Is Set 140 [Documentation] Verify if the BMC IIO-HWMON-DPS310 compatible property is 141 ... populated. 142 [Tags] Check_BMC_IIO-HWMON_Compatible_Property_Is_Set 143 [Template] Template Check Property 144 145 #Property 146 iio-hwmon-dps310/compatible 147 148 149Check BMC LED Name Property Is Set 150 [Documentation] Verify if the BMC LED name property is populated. 151 [Tags] Check_BMC_LED_Name_Property_Is_Set 152 [Template] Template Check Property 153 154 #Property 155 leds/name 156 157 158Check BMC LED Compatible Property Is Set 159 [Documentation] Verify if the BMC LED compatible property is populated. 160 [Tags] Check_BMC_LED_Compatible_Property_Is_Set 161 [Template] Template Check Property 162 163 #Property 164 leds/compatible 165 166 167*** Keywords *** 168 169Template Check Property 170 [Documentation] Check for the existence of a property in the device tree. 171 [Arguments] ${property} 172 #property: Value of Property 173 174 ${devicetree_path}= Catenate SEPARATOR= 175 ... ${devicetree_base} ${property} 176 ${output} ${stderr}= Execute Command cat ${devicetree_path} 177 ... return_stderr=True 178 Should Be Empty ${stderr} 179 ${length}= Get Length ${output} 180 Should Be True ${length} > 1 181 182