diff --git a/ACore/CMakeLists.txt b/ACore/CMakeLists.txt index 846325a4c..aedee2bf9 100644 --- a/ACore/CMakeLists.txt +++ b/ACore/CMakeLists.txt @@ -152,7 +152,8 @@ ecbuild_add_test( TARGET u_acore LABELS - unit nightly + unit + nightly SOURCES ${test_srcs} LIBS diff --git a/ANattr/CMakeLists.txt b/ANattr/CMakeLists.txt index 617740e32..e2b24473c 100644 --- a/ANattr/CMakeLists.txt +++ b/ANattr/CMakeLists.txt @@ -85,7 +85,8 @@ ecbuild_add_test( TARGET u_anattr LABELS - unit nightly + unit + nightly SOURCES ${test_srcs} LIBS diff --git a/ANode/CMakeLists.txt b/ANode/CMakeLists.txt index 9141e1630..eb350b250 100644 --- a/ANode/CMakeLists.txt +++ b/ANode/CMakeLists.txt @@ -229,7 +229,8 @@ ecbuild_add_test( TARGET u_anode LABELS - unit nightly + unit + nightly SOURCES ${test_srcs} LIBS @@ -259,7 +260,8 @@ ecbuild_add_test( TARGET u_aparser LABELS - unit nightly + unit + nightly SOURCES ${test_srcs} INCLUDES @@ -284,7 +286,8 @@ if (ENABLE_ALL_TESTS) TARGET u_anode_stest LABELS - unit nightly + unit + nightly SOURCES ${test_srcs} LIBS @@ -311,7 +314,8 @@ if (ENABLE_ALL_TESTS) TARGET perf_aparser LABELS - performance nightly + performance + nightly SOURCES ${test_srcs} LIBS @@ -338,9 +342,10 @@ if (ENABLE_ALL_TESTS) TARGET perf_aparser_timer LABELS - performance nightly + performance + nightly ARGS - ${CMAKE_CURRENT_SOURCE_DIR}/test/data/single_defs/mega.def + ${CMAKE_CURRENT_SOURCE_DIR}/parser/test/data/single_defs/mega.def SOURCES ${test_srcs} LIBS @@ -362,8 +367,9 @@ if (ENABLE_ALL_TESTS) perf_aparser_only LABELS performance + nightly ARGS - ${CMAKE_CURRENT_SOURCE_DIR}/test/data/single_defs/mega.def + ${CMAKE_CURRENT_SOURCE_DIR}/parser/test/data/single_defs/mega.def SOURCES ${test_srcs} LIBS diff --git a/Client/CMakeLists.txt b/Client/CMakeLists.txt index 49617c1ef..28fa81eea 100644 --- a/Client/CMakeLists.txt +++ b/Client/CMakeLists.txt @@ -155,6 +155,7 @@ if (ENABLE_ALL_TESTS AND ENABLE_SERVER) perf_test_large_defs LABELS performance + manual # requires manual definition of env var ECF_TEST_DEFS_DIR SOURCES # Headers test/SCPort.hpp @@ -183,6 +184,7 @@ if (ENABLE_ALL_TESTS AND ENABLE_SERVER) m_test_migration LABELS migration + manual # requires command line argument: m_test_migration <> SOURCES # Headers test/SCPort.hpp diff --git a/Client/test/TestMigration.cpp b/Client/test/TestMigration.cpp index a4439f6e2..87a603b1d 100644 --- a/Client/test/TestMigration.cpp +++ b/Client/test/TestMigration.cpp @@ -97,7 +97,13 @@ void do_test_migration(ClientInvoker& theClient, } BOOST_FIXTURE_TEST_CASE(test_migration, ArgsFixture) { - if (argc == 2 && fs::exists(argv[1])) { + if (argc != 2) { + std::cout << "Ignoring test! Since test directory is not provided\n"; + } + else if (!fs::exists(argv[1])) { + std::cout << "Ignoring test! Since provided test directory does not exist\n"; + } + else { /// This will remove checkpt and backup , to avoid server from loading it. (i.e from previous test) InvokeServer invokeServer("Client:: ...test_migration:", SCPort::next()); BOOST_REQUIRE_MESSAGE(invokeServer.server_started(), @@ -109,9 +115,6 @@ BOOST_FIXTURE_TEST_CASE(test_migration, ArgsFixture) { do_test_migration(theClient, invokeServer.host(), invokeServer.port(), argv[1], error_cnt); BOOST_REQUIRE_MESSAGE(error_cnt == 0, "Migration test failed " << error_cnt << " times "); } - else { - std::cout << "Ignoring test, since directory " << argv[1] << " not found\n"; - } } BOOST_AUTO_TEST_SUITE_END() diff --git a/Client/test/TestSinglePerf.cpp b/Client/test/TestSinglePerf.cpp index cf8152ac9..473528c77 100644 --- a/Client/test/TestSinglePerf.cpp +++ b/Client/test/TestSinglePerf.cpp @@ -355,7 +355,7 @@ void time_load_and_downloads(ClientInvoker& theClient, } BOOST_AUTO_TEST_CASE(test_perf_for_large_defs) { - if (getenv("ECF_SSL")) { + if (const char* ecf_ssl = getenv("ECF_SSL"); ecf_ssl) { load_threshold_ms = 8000; // 4500; begin_threshold_ms = 800; // 400; sync_full_threshold_s = 4.5; // 2.6; @@ -367,8 +367,13 @@ BOOST_AUTO_TEST_CASE(test_perf_for_large_defs) { client_cmds_threshold_s = 950; // 8.5; } - char* ecf_test_defs_dir = getenv("ECF_TEST_DEFS_DIR"); - if (ecf_test_defs_dir && fs::exists(ecf_test_defs_dir)) { + if (const char* ecf_test_defs_dir = getenv("ECF_TEST_DEFS_DIR"); !ecf_test_defs_dir) { + std::cout << "Ignoring test! Environment variable ECF_TEST_DEFS_DIR is not defined\n"; + } + else if (!fs::exists(ecf_test_defs_dir)) { + std::cout << "Ignoring test! Test definitions directory " << ecf_test_defs_dir << " does not exist\n"; + } + else { /// This will remove checkpt and backup , to avoid server from loading it. (i.e from previous test) InvokeServer invokeServer("Client:: ...test_perf_for_large_defs:", SCPort::next()); BOOST_REQUIRE_MESSAGE(invokeServer.server_started(), @@ -377,10 +382,6 @@ BOOST_AUTO_TEST_CASE(test_perf_for_large_defs) { ClientInvoker theClient(invokeServer.host(), invokeServer.port()); time_load_and_downloads(theClient, invokeServer.host(), invokeServer.port(), ecf_test_defs_dir); } - else { - std::cout << "Ingoring test, since directory defined by environment variable(ECF_TEST_DEFS_DIR) " - << ecf_test_defs_dir << " does not exist"; - } } BOOST_AUTO_TEST_SUITE_END() diff --git a/Test/CMakeLists.txt b/Test/CMakeLists.txt index d5b471583..0b2ad4a3a 100644 --- a/Test/CMakeLists.txt +++ b/Test/CMakeLists.txt @@ -77,7 +77,8 @@ if (ENABLE_ALL_TESTS) TARGET s_test LABELS - integration nightly + integration + nightly SOURCES ${test_srcs} LIBS @@ -92,7 +93,8 @@ if (ENABLE_ALL_TESTS) TARGET s_test_zombies LABELS - integration nightly + integration + nightly SOURCES TestZombies.cpp LIBS @@ -108,7 +110,8 @@ if (ENABLE_ALL_TESTS) TARGET s_singletest LABELS - integration nightly + integration + manual SOURCES TestSingle.cpp LIBS