diff options
author | Matt Spinler <spinler@us.ibm.com> | 2019-11-12 14:16:14 -0600 |
---|---|---|
committer | Matt Spinler <spinler@us.ibm.com> | 2019-11-19 13:34:57 -0600 |
commit | d4ffb656bb312c38d73a8afbc4d834f6d1d2fc24 (patch) | |
tree | 4ae26b7ebef7c387f44bd18bcd9f432b9a285205 /test | |
parent | 53407be367f112649cae10ebd6152f9bfd62b79b (diff) | |
download | phosphor-logging-d4ffb656bb312c38d73a8afbc4d834f6d1d2fc24.tar.gz phosphor-logging-d4ffb656bb312c38d73a8afbc4d834f6d1d2fc24.zip |
PEL: Create registry directory for test
The PEL manager test wasn't creating the message registry
directory before writing into it, and seemed to have just
been lucking out that a previous test had created it.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I122242d65db02d8b80864c938cc28be434774304
Diffstat (limited to 'test')
-rw-r--r-- | test/openpower-pels/pel_manager_test.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/openpower-pels/pel_manager_test.cpp b/test/openpower-pels/pel_manager_test.cpp index 1d4d3b7..a84ea7a 100644 --- a/test/openpower-pels/pel_manager_test.cpp +++ b/test/openpower-pels/pel_manager_test.cpp @@ -114,7 +114,10 @@ TEST_F(ManagerTest, TestCreateWithMessageRegistry) } )"; - fs::path path = getMessageRegistryPath() / "message_registry.json"; + auto path = getMessageRegistryPath(); + fs::create_directories(path); + path /= "message_registry.json"; + std::ofstream registryFile{path}; registryFile << registry; registryFile.close(); |