regulators: Enhance config file parser
Enhance JSON config file parser to convert relative inventory paths to
absolute form.
Tested:
Run local CI with -Dlong-tests=enabled to enable tests for
validate-regulators-config.py.
Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: I80237a673f9c5918898db15363847722141388e6
diff --git a/phosphor-regulators/test/actions/set_device_action_tests.cpp b/phosphor-regulators/test/actions/set_device_action_tests.cpp
index c39b9b0..129113e 100644
--- a/phosphor-regulators/test/actions/set_device_action_tests.cpp
+++ b/phosphor-regulators/test/actions/set_device_action_tests.cpp
@@ -42,15 +42,19 @@
// Create Device regulator1 and add to IDMap
std::unique_ptr<i2c::I2CInterface> i2cInterface =
i2c::create(1, 0x70, i2c::I2CInterface::InitialState::CLOSED);
- Device reg1{"regulator1", true, "/system/chassis/motherboard/reg1",
- std::move(i2cInterface)};
+ Device reg1{
+ "regulator1", true,
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
+ std::move(i2cInterface)};
idMap.addDevice(reg1);
// Create Device regulator2 and add to IDMap
i2cInterface =
i2c::create(1, 0x72, i2c::I2CInterface::InitialState::CLOSED);
- Device reg2{"regulator2", true, "/system/chassis/motherboard/reg2",
- std::move(i2cInterface)};
+ Device reg2{
+ "regulator2", true,
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg2",
+ std::move(i2cInterface)};
idMap.addDevice(reg2);
// Create ActionEnvironment