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/system_tests.cpp b/phosphor-regulators/test/system_tests.cpp
index 809d2d4..d5b5b1a 100644
--- a/phosphor-regulators/test/system_tests.cpp
+++ b/phosphor-regulators/test/system_tests.cpp
@@ -242,7 +242,8 @@
std::unique_ptr<PresenceDetection> presenceDetection{};
std::unique_ptr<Configuration> deviceConfiguration{};
std::unique_ptr<Device> device = std::make_unique<Device>(
- "reg1", true, "/system/chassis/motherboard/reg1",
+ "reg1", true,
+ "/xyz/openbmc_project/inventory/system/chassis/motherboard/reg1",
std::move(i2cInterface), std::move(presenceDetection),
std::move(deviceConfiguration), std::move(rails));