1 #include "artdaq-core/Utilities/ExceptionHandler.hh"
2 #include "artdaq-core/Utilities/configureMessageFacility.hh"
4 #define BOOST_TEST_MODULE GenFile_t
5 #include "cetlib/quiet_unit_test.hpp"
7 #include "fhiclcpp/ParameterSet.h"
8 #include "fhiclcpp/make_ParameterSet.h"
9 #include "messagefacility/MessageLogger/MessageLogger.h"
11 #include <boost/filesystem.hpp>
13 #define TRACE_NAME "GenFile_t"
14 #include "TRACE/tracemf.h"
16 BOOST_AUTO_TEST_SUITE(GenFile_test)
18 BOOST_AUTO_TEST_CASE(genFileFileNameFlags)
20 setenv(
"ARTDAQ_LOG_ROOT",
"/tmp", 1);
23 fhicl::ParameterSet pset;
24 BOOST_REQUIRE_NO_THROW(pset = fhicl::ParameterSet::make(pstr));
25 mf::StartMessageFacility(pset,
"GenFile_t");
27 mf::LogInfo(
"Test") <<
"Test Message";
28 TLOG(TLVL_INFO) <<
"Test TRACE";
30 boost::filesystem::remove_all(
"/tmp/GenFile_t");
33 BOOST_AUTO_TEST_SUITE_END()
std::string generateMessageFacilityConfiguration(char const *progname, bool useConsole=true, bool printDebug=false, char const *fileExtraName="")
Create the MessageFacility configuration Fhicl string.