Skip to content

Commit f1e9ca9

Browse files
Barthelemyknopers8
authored andcommitted
Install tests under tests (#187)
* Install tests under tests * update path to test file * fix config file for testInfrastructureGenerator.cxx
1 parent 8c3c888 commit f1e9ca9

File tree

4 files changed

+24
-16
lines changed

4 files changed

+24
-16
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ find_package(
108108
set(ENABLE_MYSQL ON)
109109
if(NOT (MYSQL_FOUND AND TARGET ROOT::RMySQL))
110110
set(ENABLE_MYSQL OFF)
111-
message(WARNING "MySQL or ROOT::RMySQL not found, the corresponding classes won't be built.")
111+
message(STATUS "MySQL or ROOT::RMySQL not found, the corresponding classes won't be built.")
112112
endif()
113113

114114
# ---- Subdirectories ----

Framework/CMakeLists.txt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -237,15 +237,10 @@ foreach(test ${TEST_SRCS})
237237
add_executable(${test_name} ${test})
238238
target_link_libraries(${test_name} PRIVATE QualityControl Boost::unit_test_framework )
239239
add_test(NAME ${test_name} COMMAND ${test_name})
240-
set_tests_properties(${test_name} PROPERTIES TIMEOUT 60)
240+
set_tests_properties(${test_name} PROPERTIES TIMEOUT 30)
241+
install(TARGETS ${test_name} DESTINATION tests)
241242
endforeach()
242243

243-
install(
244-
FILES
245-
test/testQCFactory.json
246-
DESTINATION test
247-
)
248-
249244
# ---- Install ----
250245

251246
# Build targets with install rpath on Mac to dramatically speed up installation
@@ -322,6 +317,7 @@ install(
322317
streamerinfos.root
323318
DESTINATION etc
324319
)
320+
325321
install(
326322
PROGRAMS
327323
script/RepoCleaner/1_per_hour.py
@@ -331,3 +327,9 @@ install(
331327
DESTINATION
332328
bin
333329
)
330+
331+
install(
332+
FILES
333+
test/testQCFactory.json
334+
DESTINATION tests
335+
)

Framework/test/testInfrastructureGenerator.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ using namespace o2::framework;
2929

3030
BOOST_AUTO_TEST_CASE(qc_factory_local_test)
3131
{
32-
std::string configFilePath = std::string("json:/") + getenv("QUALITYCONTROL_ROOT") + "/test/testQCFactory.json";
32+
std::string configFilePath = std::string("json:/") + getenv("QUALITYCONTROL_ROOT") + "/tests/testQCFactory.json";
3333

3434
{
3535
auto workflow = InfrastructureGenerator::generateLocalInfrastructure(configFilePath, "o2flp1");
3636

3737
BOOST_REQUIRE_EQUAL(workflow.size(), 1);
3838

39-
BOOST_CHECK_EQUAL(workflow[0].name, "skeletonTask");
39+
BOOST_CHECK_EQUAL(workflow[0].name, "QC-TASK-RUNNER-skeletonTask");
4040
BOOST_CHECK_EQUAL(workflow[0].inputs.size(), 1);
4141
BOOST_CHECK_EQUAL(workflow[0].outputs.size(), 1);
4242
BOOST_CHECK_EQUAL(DataSpecUtils::getOptionalSubSpec(workflow[0].outputs[0]).value_or(-1), 1);
@@ -47,7 +47,7 @@ BOOST_AUTO_TEST_CASE(qc_factory_local_test)
4747

4848
BOOST_REQUIRE_EQUAL(workflow.size(), 1);
4949

50-
BOOST_CHECK_EQUAL(workflow[0].name, "skeletonTask");
50+
BOOST_CHECK_EQUAL(workflow[0].name, "QC-TASK-RUNNER-skeletonTask");
5151
BOOST_CHECK_EQUAL(workflow[0].inputs.size(), 1);
5252
BOOST_CHECK_EQUAL(workflow[0].outputs.size(), 1);
5353
BOOST_CHECK_EQUAL(DataSpecUtils::getOptionalSubSpec(workflow[0].outputs[0]).value_or(-1), 2);
@@ -62,7 +62,7 @@ BOOST_AUTO_TEST_CASE(qc_factory_local_test)
6262

6363
BOOST_AUTO_TEST_CASE(qc_factory_remote_test)
6464
{
65-
std::string configFilePath = std::string("json:/") + getenv("QUALITYCONTROL_ROOT") + "/test/testQCFactory.json";
65+
std::string configFilePath = std::string("json:/") + getenv("QUALITYCONTROL_ROOT") + "/tests/testQCFactory.json";
6666
auto workflow = InfrastructureGenerator::generateRemoteInfrastructure(configFilePath);
6767

6868
// the infrastructure should consist of a merger and checker for the 'skeletonTask' (its taskRunner is declared to be

Framework/test/testQCFactory.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@
1515
},
1616
"tasks": {
1717
"skeletonTask": {
18-
"active": true,
18+
"active": "true",
1919
"className": "o2::quality_control_modules::skeleton::SkeletonTask",
2020
"moduleName": "QcSkeleton",
21-
"dataSamplingPolicy": "tpcclust",
2221
"cycleDurationSeconds": "10",
2322
"maxNumberCycles": "-1",
23+
"dataSource": {
24+
"type": "dataSamplingPolicy",
25+
"name": "tpcclust"
26+
},
2427
"taskParameters": {
2528
"parameter1": 100001,
2629
"parameter2": "qu'est-ce que c'est que ce truc la"
@@ -35,7 +38,10 @@
3538
"active": true,
3639
"className": "o2::quality_control_modules::skeleton::SkeletonTask",
3740
"moduleName": "QcSkeleton",
38-
"dataSamplingPolicy": "tpcclust",
41+
"dataSource": {
42+
"type": "dataSamplingPolicy",
43+
"name": "tpcclust"
44+
},
3945
"cycleDurationSeconds": "10",
4046
"maxNumberCycles": "-1",
4147
"taskParameters": {
@@ -45,7 +51,7 @@
4551
"location": "remote"
4652
},
4753
"defTask": {
48-
"active": false
54+
"active": "false"
4955
}
5056
}
5157
},

0 commit comments

Comments
 (0)