Project
Loading...
Searching...
No Matches
test_InfoLogger.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11#define BOOST_TEST_MODULE Test Framework InfoLoggerTest
12#define BOOST_TEST_MAIN
13#define BOOST_TEST_DYN_LINK
14
15#include <boost/test/unit_test.hpp>
16
17#include <InfoLogger/InfoLogger.hxx>
18using namespace AliceO2::InfoLogger;
19
20BOOST_AUTO_TEST_CASE(InfoLoggerTest)
21{
22
23 // define infologger output to stdout, as we don't want to use the default infoLoggerD pipe which might not be running here
24 setenv("O2_INFOLOGGER_MODE", "stdout", 1);
25
26 // create the infologger interface
27 InfoLogger theLog;
28
29 // log a test message
30 BOOST_CHECK(theLog.log("This is a log message test to stdout") == 0);
31}
BOOST_AUTO_TEST_CASE(InfoLoggerTest)
BOOST_CHECK(tree)