Compare commits

...

9 Commits

Author SHA1 Message Date
Dennis Klein
cf9a2944c2 Introduce and export hotfix version component
The cmake variable PROJECT_VERSION_HOTFIX contains the hotfix version
component. 0 means no hotfix, 1 means the first hotfix, 2 the second,
and so on.
2018-09-20 18:09:07 +02:00
Dennis Klein
94297f9833 Tie builtin plugin version to the project version 2018-09-20 18:09:07 +02:00
Alexey Rybalchenko
957233cf95 Relocate some tests to more apropriate test suits 2018-09-20 14:05:44 +02:00
Alexey Rybalchenko
5397cef9d1 Use same runner.cxx/.h for all tests 2018-09-20 14:05:44 +02:00
Alexey Rybalchenko
f6c1f5dc0f Fix theoretical race in signal handler 2018-09-20 14:05:44 +02:00
Alexey Rybalchenko
c4145e9ef1 Add test for FairMQDevice::WaitFor() 2018-09-20 14:05:44 +02:00
Alexey Rybalchenko
4123ebc9d4 Add interruptable FairMQDevice::WaitFor(duration) method 2018-09-20 14:05:44 +02:00
Dennis Klein
88f897536e Add codacy.com integration 2018-09-19 19:58:09 +02:00
Dennis Klein
e3c55a0ff8 Fix nanomsg prefix in cmake configure table 2018-09-19 19:58:09 +02:00
23 changed files with 217 additions and 156 deletions

View File

@@ -220,6 +220,9 @@ if(PROJECT_PACKAGE_DEPENDENCIES)
get_filename_component(prefix ${msgpack_include}/.. ABSOLUTE)
elseif(${dep} STREQUAL OFI)
get_filename_component(prefix ${${dep}_INCLUDE_DIRS}/.. ABSOLUTE)
elseif(${dep} STREQUAL nanomsg)
get_target_property(nn_include nanomsg INTERFACE_INCLUDE_DIRECTORIES)
get_filename_component(prefix ${nn_include}/.. ABSOLUTE)
elseif(${dep} STREQUAL Doxygen)
get_target_property(doxygen_bin Doxygen::doxygen INTERFACE_LOCATION)
get_filename_component(prefix ${doxygen_bin} DIRECTORY)

View File

@@ -1,5 +1,5 @@
<!-- {#mainpage} -->
# FairMQ [![license](https://alfa-ci.gsi.de/shields/badge/license-LGPL--3.0-orange.svg)](COPYRIGHT) [![build status](https://alfa-ci.gsi.de/buildStatus/icon?job=FairRootGroup/FairMQ/master)](https://alfa-ci.gsi.de/blue/organizations/jenkins/FairRootGroup%2FFairMQ/branches) [![test coverage master branch](https://codecov.io/gh/FairRootGroup/FairMQ/branch/master/graph/badge.svg)](https://codecov.io/gh/FairRootGroup/FairMQ/branch/master)
# FairMQ [![license](https://alfa-ci.gsi.de/shields/badge/license-LGPL--3.0-orange.svg)](COPYRIGHT) [![build status](https://alfa-ci.gsi.de/buildStatus/icon?job=FairRootGroup/FairMQ/master)](https://alfa-ci.gsi.de/blue/organizations/jenkins/FairRootGroup%2FFairMQ/branches) [![test coverage master branch](https://codecov.io/gh/FairRootGroup/FairMQ/branch/master/graph/badge.svg)](https://codecov.io/gh/FairRootGroup/FairMQ/branch/master) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/6b648d95d68d4c4eae833b84f84d299c)](https://www.codacy.com/app/dennisklein/FairMQ?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=FairRootGroup/FairMQ&amp;utm_campaign=Badge_Grade)
C++ Message Queuing Library and Framework

View File

@@ -23,6 +23,7 @@ set_and_check(@PROJECT_NAME@_CMAKEMODDIR @PACKAGE_CMAKE_INSTALL_PREFIX@/@PROJECT
set(@PROJECT_NAME@_CXX_STANDARD_REQUIRED @CMAKE_CXX_STANDARD_REQUIRED@)
set(@PROJECT_NAME@_CXX_STANDARD @CMAKE_CXX_STANDARD@)
set(@PROJECT_NAME@_CXX_EXTENSIONS @CMAKE_CXX_EXTENSIONS@)
set(@PROJECT_NAME@_VERSION_HOTFIX @PROJECT_VERSION_HOTFIX@)
### Import cmake modules
set(CMAKE_MODULE_PATH ${@PROJECT_NAME@_CMAKEMODDIR} ${CMAKE_MODULE_PATH})

View File

@@ -180,6 +180,12 @@ macro(set_fairmq_defaults)
# Rationale in https://github.com/ninja-build/ninja/issues/814
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always")
endif()
if(NOT PROJECT_VERSION_TWEAK)
set(PROJECT_VERSION_HOTFIX 0)
else()
set(PROJECT_VERSION_HOTFIX ${PROJECT_VERSION_TWEAK})
endif()
endmacro()
function(join VALUES GLUE OUTPUT)

View File

@@ -72,6 +72,9 @@ FairMQDevice::FairMQDevice(FairMQProgOptions* config, const fair::mq::tools::Ver
, fVersion(version)
, fRate(0.)
, fRawCmdLineArgs()
, fInterrupted(false)
, fInterruptedCV()
, fInterruptedMtx()
{
}
@@ -491,6 +494,10 @@ void FairMQDevice::RunWrapper()
thread rateLogger(&FairMQDevice::LogSocketRates, this);
// notify transports to resume transfers
{
lock_guard<mutex> guard(fInterruptedMtx);
fInterrupted = false;
}
for (auto& t : fTransports)
{
t.second->Resume();
@@ -909,6 +916,7 @@ void FairMQDevice::LogSocketRates()
t0 = t1;
this_thread::sleep_for(chrono::milliseconds(1000));
// WaitFor(chrono::milliseconds(1000)); TODO: enable this when nanomsg linger is fixed
}
}
}
@@ -919,6 +927,11 @@ void FairMQDevice::Unblock()
{
t.second->Interrupt();
}
{
lock_guard<mutex> guard(fInterruptedMtx);
fInterrupted = true;
}
fInterruptedCV.notify_all();
}
void FairMQDevice::ResetTaskWrapper()

View File

@@ -25,6 +25,7 @@
#include <memory> // unique_ptr
#include <algorithm> // std::sort()
#include <string>
#include <chrono>
#include <iostream>
#include <unordered_map>
#include <functional>
@@ -433,6 +434,16 @@ class FairMQDevice : public FairMQStateMachine
void RunStateMachine() { ProcessWork(); };
/// Wait for the supplied amount of time or for interruption.
/// If interrupted, returns false, otherwise true.
/// @param duration wait duration
template<class Rep, class Period>
bool WaitFor(std::chrono::duration<Rep, Period> const& duration)
{
std::unique_lock<std::mutex> lock(fInterruptedMtx);
return !fInterruptedCV.wait_for(lock, duration, [&] { return fInterrupted.load(); }); // return true if no interruption happened
}
protected:
std::shared_ptr<FairMQTransportFactory> fTransportFactory; ///< Default transport factory
std::unordered_map<fair::mq::Transport, std::shared_ptr<FairMQTransportFactory>> fTransports; ///< Container for transports
@@ -551,6 +562,10 @@ class FairMQDevice : public FairMQStateMachine
const fair::mq::tools::Version fVersion;
float fRate; ///< Rate limiting for ConditionalRun
std::vector<std::string> fRawCmdLineArgs;
std::atomic<bool> fInterrupted;
std::condition_variable fInterruptedCV;
std::mutex fInterruptedMtx;
};
#endif /* FAIRMQDEVICE_H_ */

View File

@@ -9,10 +9,14 @@
#ifndef FAIR_MQ_VERSION_H
#define FAIRMQ_VERSION "@PROJECT_VERSION@"
#define FAIRMQ_VERSION_DEC (@PROJECT_VERSION_MAJOR@ * 10000) + (@PROJECT_VERSION_MINOR@ * 100) + @PROJECT_VERSION_PATCH@
#define FAIRMQ_VERSION_DEC (@PROJECT_VERSION_MAJOR@ * 100000) \
+ (@PROJECT_VERSION_MINOR@ * 1000) \
+ (@PROJECT_VERSION_PATCH@ * 10) \
+ @PROJECT_VERSION_HOTFIX@
#define FAIRMQ_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define FAIRMQ_VERSION_MINOR @PROJECT_VERSION_MINOR@
#define FAIRMQ_VERSION_PATCH @PROJECT_VERSION_PATCH@
#define FAIRMQ_VERSION_HOTFIX @PROJECT_VERSION_HOTFIX@
#define FAIRMQ_GIT_VERSION "@PROJECT_GIT_VERSION@"
#define FAIRMQ_GIT_DATE "@PROJECT_GIT_DATE@"
#define FAIRMQ_REPO_URL "https://github.com/FairRootGroup/FairMQ"

View File

@@ -12,12 +12,13 @@
#include <poll.h> // for the interactive mode
#include <csignal> // catching system signals
#include <functional>
#include <atomic>
using namespace std;
namespace
{
volatile sig_atomic_t gSignalStatus = 0;
std::atomic<sig_atomic_t> gSignalStatus(0);
extern "C" auto signal_handler(int signal) -> void
{

View File

@@ -10,6 +10,7 @@
#define FAIR_MQ_PLUGINS_CONTROL
#include <fairmq/Plugin.h>
#include <fairmq/Version.h>
#include <condition_variable>
#include <mutex>
@@ -57,13 +58,16 @@ class Control : public Plugin
auto ControlPluginProgramOptions() -> Plugin::ProgOptions;
REGISTER_FAIRMQ_PLUGIN(
Control, // Class name
control, // Plugin name (string, lower case chars only)
(Plugin::Version{1,0,1}), // Version
"FairRootGroup <fairroot@gsi.de>", // Maintainer
"https://github.com/FairRootGroup/FairRoot", // Homepage
ControlPluginProgramOptions // Free function which declares custom program options for the plugin
// signature: () -> boost::optional<boost::program_options::options_description>
Control, // Class name
control, // Plugin name (string, lower case chars only)
(Plugin::Version{FAIRMQ_VERSION_MAJOR,
FAIRMQ_VERSION_MINOR,
FAIRMQ_VERSION_PATCH}), // Version
"FairRootGroup <fairroot@gsi.de>", // Maintainer
"https://github.com/FairRootGroup/FairRoot", // Homepage
ControlPluginProgramOptions // Free function which declares custom program options for the
// plugin signature: () ->
// boost::optional<boost::program_options::options_description>
)
} /* namespace plugins */

View File

@@ -26,6 +26,7 @@ add_testhelper(runTestDevice
helper/devices/TestReq.cxx
helper/devices/TestSub.cxx
helper/devices/TestTransferTimeout.cxx
helper/devices/TestWaitFor.cxx
LINKS FairMQ
)
@@ -38,23 +39,22 @@ set(MQ_CONFIG "${CMAKE_BINARY_DIR}/test/testsuite_FairMQ.IOPatterns_config.json"
set(RUN_TEST_DEVICE "${CMAKE_BINARY_DIR}/test/testhelper_runTestDevice")
set(FAIRMQ_BIN_DIR ${CMAKE_BINARY_DIR}/fairmq)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protocols/config.json.in ${MQ_CONFIG})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protocols/runner.cxx.in ${CMAKE_CURRENT_BINARY_DIR}/protocols/runner.cxx)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/runner.cxx.in ${CMAKE_CURRENT_BINARY_DIR}/runner.cxx)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/TestEnvironment.h.in ${CMAKE_CURRENT_BINARY_DIR}/TestEnvironment.h)
add_testsuite(FairMQ.Protocols
SOURCES
${CMAKE_CURRENT_BINARY_DIR}/protocols/runner.cxx
${CMAKE_CURRENT_BINARY_DIR}/runner.cxx
protocols/_pair.cxx
protocols/_poller.cxx
protocols/_pub_sub.cxx
protocols/_push_pull.cxx
protocols/_req_rep.cxx
protocols/_transfer_timeout.cxx
protocols/_push_pull_multipart.cxx
LINKS FairMQ
DEPENDS testhelper_runTestDevice
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/protocols
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/protocols
${CMAKE_CURRENT_BINARY_DIR}
TIMEOUT 30
RUN_SERIAL ON
@@ -63,22 +63,24 @@ add_testsuite(FairMQ.Protocols
add_testsuite(FairMQ.Parts
SOURCES
parts/runner.cxx
${CMAKE_CURRENT_BINARY_DIR}/runner.cxx
parts/_iterator_interface.cxx
LINKS FairMQ
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/parts
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/parts
${CMAKE_CURRENT_BINARY_DIR}
TIMEOUT 5
)
add_testsuite(FairMQ.MessageResize
SOURCES
message_resize/runner.cxx
${CMAKE_CURRENT_BINARY_DIR}/runner.cxx
message_resize/_message_resize.cxx
LINKS FairMQ
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/message_resize
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/message_resize
${CMAKE_CURRENT_BINARY_DIR}
TIMEOUT 5
${definitions}
@@ -86,15 +88,18 @@ add_testsuite(FairMQ.MessageResize
add_testsuite(FairMQ.Device
SOURCES
${CMAKE_CURRENT_BINARY_DIR}/runner.cxx
device/TestSender.h
device/TestReceiver.h
device/runner.cxx
device/_multiple_devices.cxx
device/_device_version.cxx
device/_device_config.cxx
device/_waitfor.cxx
LINKS FairMQ
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/device
DEPENDS testhelper_runTestDevice
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/device
${CMAKE_CURRENT_BINARY_DIR}
TIMEOUT 5
RUN_SERIAL ON
@@ -134,54 +139,81 @@ add_testlib(FairMQPlugin_test_dummy2
add_testsuite(FairMQ.Plugins
SOURCES
plugins/runner.cxx
${CMAKE_CURRENT_BINARY_DIR}/runner.cxx
plugins/_plugin.cxx
plugins/_plugin_manager.cxx
LINKS FairMQ
INCLUDES ${CMAKE_CURRENT_BINARY_DIR}
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
DEPENDS FairMQPlugin_test_dummy FairMQPlugin_test_dummy2
TIMEOUT 10
)
add_testsuite(FairMQ.PluginsPrelinked
SOURCES
plugins/runner.cxx
${CMAKE_CURRENT_BINARY_DIR}/runner.cxx
plugins/_plugin_manager_prelink.cxx
LINKS FairMQ FairMQPlugin_test_dummy FairMQPlugin_test_dummy2
INCLUDES ${CMAKE_CURRENT_BINARY_DIR}
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
TIMEOUT 10
)
add_testsuite(FairMQ.PluginServices
SOURCES
plugin_services/runner.cxx
${CMAKE_CURRENT_BINARY_DIR}/runner.cxx
plugin_services/_config.cxx
plugin_services/_control.cxx
plugin_services/Fixture.h
LINKS FairMQ
INCLUDES ${CMAKE_CURRENT_BINARY_DIR}
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
TIMEOUT 10
)
add_testsuite(FairMQ.EventManager
SOURCES
event_manager/runner.cxx
${CMAKE_CURRENT_BINARY_DIR}/runner.cxx
event_manager/_event_manager.cxx
LINKS FairMQ
INCLUDES ${CMAKE_CURRENT_BINARY_DIR}
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
TIMEOUT 10
)
add_testsuite(FairMQ.StateMachine
SOURCES
state_machine/runner.cxx
${CMAKE_CURRENT_BINARY_DIR}/runner.cxx
state_machine/_state_machine.cxx
LINKS FairMQ
INCLUDES ${CMAKE_CURRENT_BINARY_DIR}
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
TIMEOUT 10
)
add_testsuite(FairMQ.Transport
SOURCES
${CMAKE_CURRENT_BINARY_DIR}/runner.cxx
transport/_transfer_timeout.cxx
LINKS FairMQ
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
TIMEOUT 10
)
add_testsuite(FairMQ.Poller
SOURCES
${CMAKE_CURRENT_BINARY_DIR}/runner.cxx
poller/_poller.cxx
LINKS FairMQ
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
TIMEOUT 10
)

74
test/device/_waitfor.cxx Normal file
View File

@@ -0,0 +1,74 @@
/********************************************************************************
* Copyright (C) 2014-2018 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#include "runner.h"
#include <gtest/gtest.h>
#include <boost/process.hpp>
#include <sys/types.h>
#include <signal.h>
#include <string>
#include <thread>
#include <chrono>
#include <iostream>
#include <future> // std::async, std::future
namespace
{
using namespace std;
using namespace fair::mq::test;
void RunWaitFor()
{
std::mutex mtx;
std::condition_variable cv;
int pid = 0;
int exit_code = 0;
thread deviceThread([&]() {
stringstream cmd;
cmd << runTestDevice << " --id waitfor_" << " --control static " << " --severity nolog";
boost::process::ipstream stdout;
boost::process::child c(cmd.str(), boost::process::std_out > stdout);
string line;
getline(stdout, line);
{
std::lock_guard<std::mutex> lock(mtx);
pid = c.id();
}
cv.notify_one();
c.wait();
exit_code = c.exit_code();
});
{
std::unique_lock<std::mutex> lock(mtx);
cv.wait(lock, [&pid]{ return pid != 0; });
}
kill(pid, SIGINT);
deviceThread.join();
exit(exit_code);
}
TEST(Device, WaitFor)
{
EXPECT_EXIT(RunWaitFor(), ::testing::ExitedWithCode(0), "");
}
} // namespace

View File

@@ -1,19 +0,0 @@
/********************************************************************************
* Copyright (C) 2017 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#include <TestEnvironment.h>
#include <gtest/gtest.h>
auto main(int argc, char** argv) -> int
{
::testing::InitGoogleTest(&argc, argv);
::testing::FLAGS_gtest_death_test_style = "threadsafe";
setenv("FAIRMQ_PATH", FAIRMQ_TEST_ENVIRONMENT, 0);
return RUN_ALL_TESTS();
}

View File

@@ -1,20 +1,33 @@
/********************************************************************************
* Copyright (C) 2017 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* Copyright (C) 2015-2017 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#include <TestEnvironment.h>
#include <FairMQDevice.h>
#include <FairMQLogger.h>
#include <gtest/gtest.h>
#include <stdlib.h>
#include <iostream>
auto main(int argc, char** argv) -> int
namespace fair
{
::testing::InitGoogleTest(&argc, argv);
::testing::FLAGS_gtest_death_test_style = "threadsafe";
setenv("FAIRMQ_PATH", FAIRMQ_TEST_ENVIRONMENT, 0);
return RUN_ALL_TESTS();
}
namespace mq
{
namespace test
{
class TestWaitFor : public FairMQDevice
{
public:
void Run()
{
std::cout << "hello" << std::endl;
WaitFor(std::chrono::seconds(60));
}
};
} // namespace test
} // namespace mq
} // namespace fair

View File

@@ -17,9 +17,12 @@
#include "devices/TestReq.cxx"
#include "devices/TestSub.cxx"
#include "devices/TestTransferTimeout.cxx"
#include "devices/TestWaitFor.cxx"
#include <runFairMQDevice.h>
#include <boost/program_options.hpp>
#include <iostream>
#include <runFairMQDevice.h>
#include <string>
namespace bpo = boost::program_options;
@@ -80,6 +83,10 @@ auto getDevice(const FairMQProgOptions& config) -> FairMQDevicePtr
{
return new PairRight;
}
else if (0 == id.find("waitfor_"))
{
return new TestWaitFor;
}
else
{
cerr << "Don't know id '" << id << "'" << endl;

View File

@@ -1,19 +0,0 @@
/********************************************************************************
* Copyright (C) 2017 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#include <TestEnvironment.h>
#include <gtest/gtest.h>
auto main(int argc, char** argv) -> int
{
::testing::InitGoogleTest(&argc, argv);
::testing::FLAGS_gtest_death_test_style = "threadsafe";
setenv("FAIRMQ_PATH", FAIRMQ_TEST_ENVIRONMENT, 0);
return RUN_ALL_TESTS();
}

View File

@@ -1,16 +0,0 @@
/********************************************************************************
* Copyright (C) 2017 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#include <gtest/gtest.h>
auto main(int argc, char** argv) -> int
{
::testing::InitGoogleTest(&argc, argv);
::testing::FLAGS_gtest_death_test_style = "threadsafe";
return RUN_ALL_TESTS();
}

View File

@@ -1,19 +0,0 @@
/********************************************************************************
* Copyright (C) 2017 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#include <TestEnvironment.h>
#include <gtest/gtest.h>
int main(int argc, char** argv)
{
::testing::InitGoogleTest(&argc, argv);
::testing::FLAGS_gtest_death_test_style = "threadsafe";
setenv("FAIRMQ_PATH", FAIRMQ_TEST_ENVIRONMENT, 0);
return RUN_ALL_TESTS();
}

View File

@@ -1,19 +0,0 @@
/********************************************************************************
* Copyright (C) 2017 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#include <TestEnvironment.h>
#include <gtest/gtest.h>
int main(int argc, char** argv)
{
::testing::InitGoogleTest(&argc, argv);
::testing::FLAGS_gtest_death_test_style = "threadsafe";
setenv("FAIRMQ_PATH", FAIRMQ_TEST_ENVIRONMENT, 0);
return RUN_ALL_TESTS();
}

View File

@@ -6,13 +6,12 @@
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#include "runner.h"
#include <runner.h>
#include <TestEnvironment.h>
#include <gtest/gtest.h>
#include <string>
#include <iostream>
namespace fair
{
@@ -30,7 +29,7 @@ string mqConfig = "@MQ_CONFIG@";
} /* namespace mq */
} /* namespace fair */
auto main(int argc, char** argv) -> int
int main(int argc, char** argv)
{
::testing::InitGoogleTest(&argc, argv);
::testing::FLAGS_gtest_death_test_style = "threadsafe";

View File

@@ -1,19 +0,0 @@
/********************************************************************************
* Copyright (C) 2017 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#include <TestEnvironment.h>
#include <gtest/gtest.h>
auto main(int argc, char** argv) -> int
{
::testing::InitGoogleTest(&argc, argv);
::testing::FLAGS_gtest_death_test_style = "threadsafe";
setenv("FAIRMQ_PATH", FAIRMQ_TEST_ENVIRONMENT, 0);
return RUN_ALL_TESTS();
}