blob: 6e413793807b29fa3d64ee05fa0435698a585c26 [file] [log] [blame]
Deepak Kodihalli707a3e12017-06-14 03:56:12 -05001#include "config.h"
2
Patrick Venturef18bf832018-10-26 18:14:00 -07003#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 Kodihalli707a3e12017-06-14 03:56:12 -050012namespace phosphor
13{
14namespace logging
15{
16namespace test
17{
18
19namespace fs = std::experimental::filesystem;
20
21char tmplt[] = "/tmp/logging_test.XXXXXX";
22auto bus = sdbusplus::bus::new_default();
Nagaraju Goruganti05aae8b2017-08-30 07:56:12 -050023phosphor::logging::internal::Manager manager(bus, OBJ_INTERNAL);
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050024
25class TestSerialization : public testing::Test
26{
Patrick Venturef18bf832018-10-26 18:14:00 -070027 public:
28 TestSerialization() : dir(fs::path(mkdtemp(tmplt)))
29 {
30 }
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050031
Patrick Venturef18bf832018-10-26 18:14:00 -070032 ~TestSerialization()
33 {
34 fs::remove_all(dir);
35 }
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050036
Patrick Venturef18bf832018-10-26 18:14:00 -070037 fs::path dir;
Deepak Kodihalli707a3e12017-06-14 03:56:12 -050038};
39
40} // namespace test
41} // namespace logging
42} // namespace phosphor