Steve DiBenedetto | bf6a93d | 2014-03-21 14:03:02 -0600 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 | /** |
| 3 | * Copyright (C) 2014 Named Data Networking Project |
| 4 | * See COPYING for copyright and distribution information. |
| 5 | */ |
| 6 | |
| 7 | #include "../test-common.hpp" |
| 8 | #include "core/logger.hpp" |
| 9 | #include "mgmt/config-file.hpp" |
| 10 | |
| 11 | #include <boost/filesystem.hpp> |
| 12 | |
| 13 | namespace nfd { |
| 14 | namespace tests { |
| 15 | |
| 16 | class GlobalConfigurationFixture |
| 17 | { |
| 18 | public: |
| 19 | GlobalConfigurationFixture() |
| 20 | { |
| 21 | const std::string filename = "unit-tests.conf"; |
| 22 | if (boost::filesystem::exists(filename)) |
| 23 | { |
| 24 | ConfigFile config; |
| 25 | LoggerFactory::getInstance().setConfigFile(config); |
| 26 | |
| 27 | config.parse(filename, false); |
| 28 | } |
| 29 | } |
| 30 | }; |
| 31 | |
| 32 | BOOST_GLOBAL_FIXTURE(GlobalConfigurationFixture) |
| 33 | |
| 34 | } // namespace tests |
| 35 | } // namespace nfd |