Deepak Kodihalli | 707a3e1 | 2017-06-14 03:56:12 -0500 | [diff] [blame] | 1 | #include <gtest/gtest.h> |
| 2 | #include <experimental/filesystem> |
| 3 | #include <stdlib.h> |
| 4 | #include <sdbusplus/bus.hpp> |
| 5 | #include "log_manager.hpp" |
| 6 | #include "config.h" |
| 7 | |
| 8 | namespace phosphor |
| 9 | { |
| 10 | namespace logging |
| 11 | { |
| 12 | namespace test |
| 13 | { |
| 14 | |
| 15 | namespace fs = std::experimental::filesystem; |
| 16 | |
| 17 | char tmplt[] = "/tmp/logging_test.XXXXXX"; |
| 18 | auto bus = sdbusplus::bus::new_default(); |
| 19 | phosphor::logging::Manager manager(bus, OBJ_INTERNAL); |
| 20 | |
| 21 | class TestSerialization : public testing::Test |
| 22 | { |
| 23 | public: |
| 24 | TestSerialization() : |
| 25 | dir(fs::path(mkdtemp(tmplt))) |
| 26 | { |
| 27 | } |
| 28 | |
| 29 | ~TestSerialization() |
| 30 | { |
| 31 | fs::remove_all(dir); |
| 32 | } |
| 33 | |
| 34 | fs::path dir; |
| 35 | }; |
| 36 | |
| 37 | } // namespace test |
| 38 | } // namespace logging |
| 39 | } // namespace phosphor |
| 40 | |
| 41 | |