update_cbi ========== **Source code:** `update_cbi.py `_ A test to update CBI data to EEPROM. Description ----------- A test to set CBI data from device data to EEPROM by using ``ectool cbi``. Available device data are `component.sku`, `component.dram_part_num` and `component.pcb_supplier`. When updating the SKU ID, if the FW Config can be queried from the cros_config, then the FW Config will be updated as well. If you want to run the pytest `model_sku` with the SKU ID set by this pytest, you need to reboot the DUT first. Test Procedure -------------- This is an automatic test that doesn't need any user interaction. Dependency ---------- - ``ectool`` utility. - ``cros_config_mock`` utility. - ``chromeos-base/cros-config-api``. Examples -------- To set SKU_ID, DRAM_PART_NUM and PCB_SUPPLIER from device data to CBI, add this in test list:: { "pytest_name": "update_cbi", "args": { "cbi_data_names": ['SKU_ID', 'DRAM_PART_NUM', 'PCB_SUPPLIER'] } } To set SKU ID and run the pytest `model_sku`, add this in test list:: { "subtests": [ { "pytest_name": "update_cbi", "args": { "cbi_data_names": ['SKU_ID'] } }, "FullRebootStep", { "pytest_name": "model_sku" } ] } Test Arguments -------------- .. list-table:: :widths: 20 10 60 :header-rows: 1 :align: left * - Name - Type - Description * - cbi_data_names - list - List of CBI data names to update * - force - bool - (optional; default: ``False``) If true then overwrite settings even if the sku_id is the same. * - sku_id_source - ['device_data', 'hardcode'] - (optional; default: ````) The source of sku_id. * - hardcode_sku_id - int, None - (optional; default: ``None``) The hard-code sku_id. * - config_source - ['config_jsonproto', 'cros_config_mock', 'model_sku'] - (optional; default: ````) The source of updating data. * - program - str, None - (optional; default: ``None``) The program of the device. * - project - str, None - (optional; default: ``None``) The project of the device. * - product_name - str, None - (optional; default: ``None``) The product_name of the device. If not specified, read from /sys/class/dmi/id/product_name on x86 devices and /proc/device-tree/compatible on ARM devices. * - enable_factory_server - bool - (optional; default: ``False``) Update project_config data from factory server.