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