commit | 906cc3f3b3ffbd6179472c39a6c5acebbc7cbc66 | [log] [tgz] |
---|---|---|
author | Shawn McCarney <shawnmm@us.ibm.com> | Thu Feb 01 13:33:06 2024 -0600 |
committer | Shawn McCarney <shawnmm@us.ibm.com> | Wed Feb 07 21:54:18 2024 +0000 |
tree | 425a1394bc8229077d004237eeed5ba8785f6e9f | |
parent | 8d202f1631e0936e3bbbfcb1ec608e30a34cd666 [diff] |
pseq: Add Services class for automated testing Add a Services class hierarchy to enable mocking and automated testing. The class methods provide a high level abstraction for system services like error logging and presence detection. * Services: Abstract base class * BMCServices: Sub-class with real implementation using BMC services * MockServices: Sub-class with mock implementation for automated testing * Tested: * Tested all methods in BMCServices class * When method succeeds * When method fails; verify all error paths * The detailed test plan is available in a gist: * https://gist.github.com/smccarney/e7a250011133c7e3040a8bce240705c5 Change-Id: If17ef8c4540b3ee07cced947bc49a950141b38ae Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
This repository contains applications for configuring and monitoring devices that deliver power to the system.
To build all applications in this repository:
meson setup build ninja -C build
To clean the repository and remove all build output:
rm -rf build
You can specify meson options to customize the build process. For example, you can specify:
Several applications in this repository require a PSU JSON config to run. The JSON config file provides information for:
There is an example psu.json to describe the necessary configurations.
inventoryPMBusAccessType
defines the pmbus access type, which tells the service which sysfs type to use to read the attributes. The possible values are:/sys/bus/i2c/devices/3-0069/
/sys/bus/i2c/devices/3-0069/hwmon/hwmonX/
/sys/kernel/debug/pmbus/hwmonX/
/sys/kernel/debug/pmbus/hwmonX/cffps1/
fruConfigs
defines the mapping between the attribute file and the FRU inventory interface and property. The configuration example below indicates that the service will read part_number
attribute file from a directory specified by the above pmbus access type, and assign to PartNumber
property in xyz.openbmc_project.Inventory.Decorator.Asset
interface."fruConfigs": [ { "propertyName": "PartNumber", "fileName": "part_number", "interface": "xyz.openbmc_project.Inventory.Decorator.Asset" } ]
psuDevices
defines the kernel device dir for each PSU in inventory. The configuration example below indicates that powersupply0
's device is located in /sys/bus/i2c/devices/3-0069
."psuDevices": { "/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0" : "/sys/bus/i2c/devices/3-0069", }