mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 08:41:16 +00:00
provide FAIRMQ_PATH to test suites
This commit is contained in:
parent
e295978b3e
commit
2a6e4de72c
|
@ -33,8 +33,10 @@ add_testhelper(runTestDevice
|
||||||
|
|
||||||
set(MQ_CONFIG "${CMAKE_BINARY_DIR}/test/testsuite_FairMQ.IOPatterns_config.json")
|
set(MQ_CONFIG "${CMAKE_BINARY_DIR}/test/testsuite_FairMQ.IOPatterns_config.json")
|
||||||
set(RUN_TEST_DEVICE "${CMAKE_BINARY_DIR}/test/testhelper_runTestDevice")
|
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/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}/protocols/runner.cxx.in ${CMAKE_CURRENT_BINARY_DIR}/protocols/runner.cxx)
|
||||||
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/TestEnvironment.h.in ${CMAKE_CURRENT_BINARY_DIR}/TestEnvironment.h)
|
||||||
|
|
||||||
add_testsuite(FairMQ.Protocols
|
add_testsuite(FairMQ.Protocols
|
||||||
SOURCES
|
SOURCES
|
||||||
|
@ -50,6 +52,7 @@ add_testsuite(FairMQ.Protocols
|
||||||
LINKS FairMQ
|
LINKS FairMQ
|
||||||
DEPENDS testhelper_runTestDevice
|
DEPENDS testhelper_runTestDevice
|
||||||
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/protocols
|
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/protocols
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
TIMEOUT 30
|
TIMEOUT 30
|
||||||
RUN_SERIAL ON
|
RUN_SERIAL ON
|
||||||
)
|
)
|
||||||
|
@ -61,6 +64,7 @@ add_testsuite(FairMQ.Parts
|
||||||
|
|
||||||
LINKS FairMQ
|
LINKS FairMQ
|
||||||
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/parts
|
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/parts
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
TIMEOUT 5
|
TIMEOUT 5
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -71,6 +75,7 @@ add_testsuite(FairMQ.MessageResize
|
||||||
|
|
||||||
LINKS FairMQ
|
LINKS FairMQ
|
||||||
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/message_resize
|
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/message_resize
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
TIMEOUT 5
|
TIMEOUT 5
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -85,6 +90,7 @@ add_testsuite(FairMQ.Device
|
||||||
|
|
||||||
LINKS FairMQ
|
LINKS FairMQ
|
||||||
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/device
|
INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/device
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
TIMEOUT 5
|
TIMEOUT 5
|
||||||
RUN_SERIAL ON
|
RUN_SERIAL ON
|
||||||
)
|
)
|
||||||
|
@ -128,6 +134,7 @@ add_testsuite(FairMQ.Plugins
|
||||||
plugins/_plugin_manager.cxx
|
plugins/_plugin_manager.cxx
|
||||||
|
|
||||||
LINKS FairMQ
|
LINKS FairMQ
|
||||||
|
INCLUDES ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
DEPENDS FairMQPlugin_test_dummy FairMQPlugin_test_dummy2
|
DEPENDS FairMQPlugin_test_dummy FairMQPlugin_test_dummy2
|
||||||
TIMEOUT 10
|
TIMEOUT 10
|
||||||
)
|
)
|
||||||
|
@ -138,6 +145,7 @@ add_testsuite(FairMQ.PluginsPrelinked
|
||||||
plugins/_plugin_manager_prelink.cxx
|
plugins/_plugin_manager_prelink.cxx
|
||||||
|
|
||||||
LINKS FairMQ FairMQPlugin_test_dummy FairMQPlugin_test_dummy2
|
LINKS FairMQ FairMQPlugin_test_dummy FairMQPlugin_test_dummy2
|
||||||
|
INCLUDES ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
TIMEOUT 10
|
TIMEOUT 10
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -149,6 +157,7 @@ add_testsuite(FairMQ.PluginServices
|
||||||
plugin_services/Fixture.h
|
plugin_services/Fixture.h
|
||||||
|
|
||||||
LINKS FairMQ
|
LINKS FairMQ
|
||||||
|
INCLUDES ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
TIMEOUT 10
|
TIMEOUT 10
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -158,6 +167,7 @@ add_testsuite(FairMQ.EventManager
|
||||||
event_manager/_event_manager.cxx
|
event_manager/_event_manager.cxx
|
||||||
|
|
||||||
LINKS FairMQ
|
LINKS FairMQ
|
||||||
|
INCLUDES ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
TIMEOUT 10
|
TIMEOUT 10
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -167,5 +177,6 @@ add_testsuite(FairMQ.StateMachine
|
||||||
state_machine/_state_machine.cxx
|
state_machine/_state_machine.cxx
|
||||||
|
|
||||||
LINKS FairMQ
|
LINKS FairMQ
|
||||||
|
INCLUDES ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
TIMEOUT 10
|
TIMEOUT 10
|
||||||
)
|
)
|
||||||
|
|
14
test/TestEnvironment.h.in
Normal file
14
test/TestEnvironment.h.in
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
/********************************************************************************
|
||||||
|
* 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" *
|
||||||
|
********************************************************************************/
|
||||||
|
|
||||||
|
#ifndef FAIR_MQ_TEST_ENVIRONMENT_H
|
||||||
|
#define FAIR_MQ_TEST_ENVIRONMENT_H
|
||||||
|
|
||||||
|
#define FAIRMQ_TEST_ENVIRONMENT "@FAIRMQ_BIN_DIR@"
|
||||||
|
|
||||||
|
#endif /* FAIR_MQ_TEST_ENVIRONMENT_H */
|
|
@ -6,11 +6,15 @@
|
||||||
* copied verbatim in the file "LICENSE" *
|
* copied verbatim in the file "LICENSE" *
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
|
#include <TestEnvironment.h>
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
auto main(int argc, char** argv) -> int
|
auto main(int argc, char** argv) -> int
|
||||||
{
|
{
|
||||||
::testing::InitGoogleTest(&argc, argv);
|
::testing::InitGoogleTest(&argc, argv);
|
||||||
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
||||||
|
setenv("FAIRMQ_PATH", FAIRMQ_TEST_ENVIRONMENT, 0);
|
||||||
return RUN_ALL_TESTS();
|
return RUN_ALL_TESTS();
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,14 @@
|
||||||
* copied verbatim in the file "LICENSE" *
|
* copied verbatim in the file "LICENSE" *
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
|
#include <TestEnvironment.h>
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
auto main(int argc, char** argv) -> int
|
auto main(int argc, char** argv) -> int
|
||||||
{
|
{
|
||||||
::testing::InitGoogleTest(&argc, argv);
|
::testing::InitGoogleTest(&argc, argv);
|
||||||
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
||||||
|
setenv("FAIRMQ_PATH", FAIRMQ_TEST_ENVIRONMENT, 0);
|
||||||
return RUN_ALL_TESTS();
|
return RUN_ALL_TESTS();
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,14 @@
|
||||||
* copied verbatim in the file "LICENSE" *
|
* copied verbatim in the file "LICENSE" *
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
|
#include <TestEnvironment.h>
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
auto main(int argc, char** argv) -> int
|
auto main(int argc, char** argv) -> int
|
||||||
{
|
{
|
||||||
::testing::InitGoogleTest(&argc, argv);
|
::testing::InitGoogleTest(&argc, argv);
|
||||||
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
||||||
|
setenv("FAIRMQ_PATH", FAIRMQ_TEST_ENVIRONMENT, 0);
|
||||||
return RUN_ALL_TESTS();
|
return RUN_ALL_TESTS();
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,14 @@
|
||||||
* copied verbatim in the file "LICENSE" *
|
* copied verbatim in the file "LICENSE" *
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
|
#include <TestEnvironment.h>
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
::testing::InitGoogleTest(&argc, argv);
|
::testing::InitGoogleTest(&argc, argv);
|
||||||
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
||||||
|
setenv("FAIRMQ_PATH", FAIRMQ_TEST_ENVIRONMENT, 0);
|
||||||
return RUN_ALL_TESTS();
|
return RUN_ALL_TESTS();
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,14 @@
|
||||||
* copied verbatim in the file "LICENSE" *
|
* copied verbatim in the file "LICENSE" *
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
|
#include <TestEnvironment.h>
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
::testing::InitGoogleTest(&argc, argv);
|
::testing::InitGoogleTest(&argc, argv);
|
||||||
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
||||||
|
setenv("FAIRMQ_PATH", FAIRMQ_TEST_ENVIRONMENT, 0);
|
||||||
return RUN_ALL_TESTS();
|
return RUN_ALL_TESTS();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
#include "runner.h"
|
#include "runner.h"
|
||||||
|
#include <TestEnvironment.h>
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
@ -33,5 +34,6 @@ auto main(int argc, char** argv) -> int
|
||||||
{
|
{
|
||||||
::testing::InitGoogleTest(&argc, argv);
|
::testing::InitGoogleTest(&argc, argv);
|
||||||
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
||||||
|
setenv("FAIRMQ_PATH", FAIRMQ_TEST_ENVIRONMENT, 0);
|
||||||
return RUN_ALL_TESTS();
|
return RUN_ALL_TESTS();
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,14 @@
|
||||||
* copied verbatim in the file "LICENSE" *
|
* copied verbatim in the file "LICENSE" *
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
|
#include <TestEnvironment.h>
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
auto main(int argc, char** argv) -> int
|
auto main(int argc, char** argv) -> int
|
||||||
{
|
{
|
||||||
::testing::InitGoogleTest(&argc, argv);
|
::testing::InitGoogleTest(&argc, argv);
|
||||||
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
||||||
|
setenv("FAIRMQ_PATH", FAIRMQ_TEST_ENVIRONMENT, 0);
|
||||||
return RUN_ALL_TESTS();
|
return RUN_ALL_TESTS();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user