1 #include "config.h" 2 3 #include "log_manager.hpp" 4 5 #include <stdlib.h> 6 7 #include <experimental/filesystem> 8 #include <sdbusplus/bus.hpp> 9 #include <sdbusplus/test/sdbus_mock.hpp> 10 11 #include <gtest/gtest.h> 12 13 namespace phosphor 14 { 15 namespace logging 16 { 17 namespace test 18 { 19 20 namespace fs = std::experimental::filesystem; 21 22 char tmplt[] = "/tmp/logging_test.XXXXXX"; 23 sdbusplus::SdBusMock sdbusMock; 24 sdbusplus::bus::bus bus = sdbusplus::get_mocked_new(&sdbusMock); 25 phosphor::logging::internal::Manager manager(bus, OBJ_INTERNAL); 26 27 class TestSerialization : public testing::Test 28 { 29 public: 30 TestSerialization() : dir(fs::path(mkdtemp(tmplt))) 31 { 32 } 33 34 ~TestSerialization() 35 { 36 fs::remove_all(dir); 37 } 38 39 fs::path dir; 40 }; 41 42 } // namespace test 43 } // namespace logging 44 } // namespace phosphor 45