diff --git a/libs/base/CMakeLists.txt b/libs/base/CMakeLists.txt index 341cfe1aa..7974e44aa 100644 --- a/libs/base/CMakeLists.txt +++ b/libs/base/CMakeLists.txt @@ -50,6 +50,7 @@ ecbuild_add_test( ecflow_all Threads::Threads $<$:OpenSSL::SSL> + test_support TEST_DEPENDS u_parser ) diff --git a/libs/base/test/TestAlterCmd.cpp b/libs/base/test/TestAlterCmd.cpp index 1fe0f7ffc..088b42fb5 100644 --- a/libs/base/test/TestAlterCmd.cpp +++ b/libs/base/test/TestAlterCmd.cpp @@ -11,6 +11,7 @@ #include #include "TestHelper.hpp" +#include "TestNaming.hpp" #include "ecflow/attribute/GenericAttr.hpp" #include "ecflow/attribute/LateAttr.hpp" #include "ecflow/base/cts/user/AlterCmd.hpp" @@ -74,13 +75,15 @@ class TestDefsStateChanged { }; BOOST_AUTO_TEST_CASE(test_add_log5) { + ECF_NAME_THIS_TEST(); + // create once for all test below, then remove at the end Log::create("test_add_log5.log"); BOOST_CHECK_MESSAGE(true, "stop boost test form complaining"); } BOOST_AUTO_TEST_CASE(test_alter_cmd_for_clock_type_hybrid) { - cout << "Base:: ...test_alter_cmd_for_clock_type_hybrid\n"; + ECF_NAME_THIS_TEST(); // In this test the suite has NO Clock attribute. It should get added automatically // when a new clock is added, we should sync with the computer clock @@ -117,7 +120,7 @@ BOOST_AUTO_TEST_CASE(test_alter_cmd_for_clock_type_hybrid) { } BOOST_AUTO_TEST_CASE(test_alter_cmd_for_clock_type_real) { - cout << "Base:: ...test_alter_cmd_for_clock_type_real\n"; + ECF_NAME_THIS_TEST(); // In this test the suite has NO Clock attribute. It should get added automatically // when a new clock is added, we should sync with the computer clock @@ -153,7 +156,7 @@ BOOST_AUTO_TEST_CASE(test_alter_cmd_for_clock_type_real) { } BOOST_AUTO_TEST_CASE(test_alter_cmd_for_clock_sync) { - cout << "Base:: ...test_alter_cmd_for_clock_sync\n"; + ECF_NAME_THIS_TEST(); // Add a suite with a hybrid clock set to the past, on switch to real time, should have todays date // Since the clock exists on the suite, with another date, we must explicitly sync with computer @@ -209,7 +212,7 @@ BOOST_AUTO_TEST_CASE(test_alter_cmd_for_clock_sync) { } BOOST_AUTO_TEST_CASE(test_alter_cmd_for_clock_date) { - cout << "Base:: ...test_alter_cmd_for_clock_date\n"; + ECF_NAME_THIS_TEST(); // In this test the suite has NO Clock attribute. It should get added automatically Defs defs; @@ -256,7 +259,7 @@ BOOST_AUTO_TEST_CASE(test_alter_cmd_for_clock_date) { } BOOST_AUTO_TEST_CASE(test_alter_cmd_for_clock_gain) { - cout << "Base:: ...test_alter_cmd_for_clock_gain\n"; + ECF_NAME_THIS_TEST(); // In this test the suite has NO Clock attribute. It should get added automatically Defs defs; @@ -323,7 +326,7 @@ BOOST_AUTO_TEST_CASE(test_alter_cmd_for_clock_gain) { } BOOST_AUTO_TEST_CASE(test_alter_cmd) { - cout << "Base:: ...test_alter_cmd\n"; + ECF_NAME_THIS_TEST(); Defs defs; suite_ptr s = defs.add_suite("suite"); @@ -1131,7 +1134,7 @@ void add_sorted_attributes(Node* node) { } BOOST_AUTO_TEST_CASE(test_alter_sort_attributes) { - cout << "Base:: ...test_alter_sort_attributes\n"; + ECF_NAME_THIS_TEST(); Defs defs; defs.set_server().add_or_update_user_variables("z", "z"); @@ -1171,7 +1174,7 @@ BOOST_AUTO_TEST_CASE(test_alter_sort_attributes) { } BOOST_AUTO_TEST_CASE(test_alter_sort_attributes_for_task) { - cout << "Base:: ...test_alter_sort_attributes_for_task\n"; + ECF_NAME_THIS_TEST(); Defs defs; suite_ptr s = defs.add_suite("suite"); @@ -1202,7 +1205,7 @@ BOOST_AUTO_TEST_CASE(test_alter_sort_attributes_for_task) { } BOOST_AUTO_TEST_CASE(test_alter_cmd_errors) { - cout << "Base:: ...test_alter_cmd_errors\n"; + ECF_NAME_THIS_TEST(); Defs defs; suite_ptr s = defs.add_suite("suite"); diff --git a/libs/base/test/TestArchiveAndRestoreCmd.cpp b/libs/base/test/TestArchiveAndRestoreCmd.cpp index 1fd86c158..5603a62dd 100644 --- a/libs/base/test/TestArchiveAndRestoreCmd.cpp +++ b/libs/base/test/TestArchiveAndRestoreCmd.cpp @@ -11,6 +11,7 @@ #include #include "TestHelper.hpp" +#include "TestNaming.hpp" #include "ecflow/base/cts/user/BeginCmd.hpp" #include "ecflow/base/cts/user/DeleteCmd.hpp" #include "ecflow/base/cts/user/PathsCmd.hpp" @@ -37,7 +38,7 @@ BOOST_AUTO_TEST_CASE(test_add_log4) { } BOOST_AUTO_TEST_CASE(test_archive_and_restore_suite) { - cout << "Base:: ...test_archive_and_restore_suite\n"; + ECF_NAME_THIS_TEST(); // Please note: after archive we delete the children, hence any references to child refer to a different object @@ -84,7 +85,7 @@ BOOST_AUTO_TEST_CASE(test_archive_and_restore_suite) { } BOOST_AUTO_TEST_CASE(test_archive_and_restore_family) { - cout << "Base:: ...test_archive_and_restore_family\n"; + ECF_NAME_THIS_TEST(); // Create the defs file corresponding to the text below // suite suite @@ -130,7 +131,7 @@ BOOST_AUTO_TEST_CASE(test_archive_and_restore_family) { } BOOST_AUTO_TEST_CASE(test_archive_and_restore_all) { - cout << "Base:: ...test_archive_and_restore_all\n"; + ECF_NAME_THIS_TEST(); // Create the defs file corresponding to the text below // suite suite @@ -233,7 +234,7 @@ BOOST_AUTO_TEST_CASE(test_archive_and_restore_all) { } BOOST_AUTO_TEST_CASE(test_archive_and_restore_overlap) { - cout << "Base:: ...test_archive_and_restore_overlap\n"; + ECF_NAME_THIS_TEST(); // Create the defs file corresponding to the text below // suite suite @@ -276,7 +277,7 @@ BOOST_AUTO_TEST_CASE(test_archive_and_restore_overlap) { } BOOST_AUTO_TEST_CASE(test_archive_and_delete_suite) { - cout << "Base:: ...test_archive_and_delete_suite\n"; + ECF_NAME_THIS_TEST(); // Create the defs file corresponding to the text below // suite suite @@ -315,7 +316,7 @@ BOOST_AUTO_TEST_CASE(test_archive_and_delete_suite) { } BOOST_AUTO_TEST_CASE(test_archive_and_restore_errors) { - cout << "Base:: ...test_archive_and_restore_errors\n"; + ECF_NAME_THIS_TEST(); // Create the defs file corresponding to the text below // suite suite diff --git a/libs/base/test/TestClientHandleCmd.cpp b/libs/base/test/TestClientHandleCmd.cpp index fefca296c..f613efab4 100644 --- a/libs/base/test/TestClientHandleCmd.cpp +++ b/libs/base/test/TestClientHandleCmd.cpp @@ -11,6 +11,7 @@ #include #include "TestHelper.hpp" +#include "TestNaming.hpp" #include "ecflow/base/cts/user/ClientHandleCmd.hpp" #include "ecflow/base/cts/user/OrderNodeCmd.hpp" #include "ecflow/core/Converter.hpp" @@ -33,7 +34,7 @@ BOOST_AUTO_TEST_CASE(test_add_log3) { } BOOST_AUTO_TEST_CASE(test_client_handle_cmd_empty_server) { - cout << "Base:: ...test_client_handle_cmd_empty_server\n"; + ECF_NAME_THIS_TEST(); std::vector suite_names; suite_names.reserve(5); @@ -87,7 +88,7 @@ BOOST_AUTO_TEST_CASE(test_client_handle_cmd_empty_server) { } BOOST_AUTO_TEST_CASE(test_client_handle_cmd_register_and_drop) { - cout << "Base:: ...test_client_handle_cmd_register_and_drop\n"; + ECF_NAME_THIS_TEST(); std::vector suite_names; suite_names.reserve(6); @@ -120,7 +121,7 @@ BOOST_AUTO_TEST_CASE(test_client_handle_cmd_register_and_drop) { } BOOST_AUTO_TEST_CASE(test_client_handle_cmd_register__with_drop) { - cout << "Base:: ...test_client_handle_cmd_register_with_drop\n"; + ECF_NAME_THIS_TEST(); std::vector suite_names; suite_names.reserve(6); @@ -164,7 +165,7 @@ BOOST_AUTO_TEST_CASE(test_client_handle_cmd_register__with_drop) { } BOOST_AUTO_TEST_CASE(test_client_handle_cmd_auto_add) { - cout << "Base:: ...test_client_handle_cmd_auto_add\n"; + ECF_NAME_THIS_TEST(); std::vector suite_names; suite_names.reserve(6); @@ -222,7 +223,7 @@ BOOST_AUTO_TEST_CASE(test_client_handle_cmd_auto_add) { } BOOST_AUTO_TEST_CASE(test_client_handle_cmd_add_remove) { - cout << "Base:: ...test_client_handle_cmd_add_remove\n"; + ECF_NAME_THIS_TEST(); std::vector suite_names; suite_names.reserve(6); @@ -312,7 +313,7 @@ static bool check_ordering(Defs& defs) { } BOOST_AUTO_TEST_CASE(test_client_handle_suite_ordering) { - cout << "Base:: ...test_client_handle_suite_ordering\n"; + ECF_NAME_THIS_TEST(); // ensure order of suites in a handle is the same as server suites std::vector suite_names; diff --git a/libs/base/test/TestCmd.cpp b/libs/base/test/TestCmd.cpp index 04dac832c..b3e330226 100644 --- a/libs/base/test/TestCmd.cpp +++ b/libs/base/test/TestCmd.cpp @@ -14,6 +14,7 @@ #include #include "TestHelper.hpp" +#include "TestNaming.hpp" #include "ecflow/base/cts/task/AbortCmd.hpp" #include "ecflow/base/cts/user/BeginCmd.hpp" #include "ecflow/base/cts/user/CtsCmd.hpp" @@ -33,7 +34,8 @@ BOOST_AUTO_TEST_SUITE(U_Base) BOOST_AUTO_TEST_SUITE(T_Cmd) BOOST_AUTO_TEST_CASE(test_simple_cmd) { - cout << "Base:: ...test_simple_cmd\n"; + ECF_NAME_THIS_TEST(); + TestLog test_log("test_simple_cmd.log"); // will create log file, and destroy log and remove file at end of scope // Create the defs file. Note that the default ECF_TRIES = 3 diff --git a/libs/base/test/TestDeleteNodeCmd.cpp b/libs/base/test/TestDeleteNodeCmd.cpp index 97c3afc7a..206db04d4 100644 --- a/libs/base/test/TestDeleteNodeCmd.cpp +++ b/libs/base/test/TestDeleteNodeCmd.cpp @@ -12,6 +12,7 @@ #include "MockServer.hpp" #include "MyDefsFixture.hpp" +#include "TestNaming.hpp" #include "ecflow/base/cts/user/DeleteCmd.hpp" #include "ecflow/base/cts/user/PathsCmd.hpp" #include "ecflow/base/stc/ServerToClientCmd.hpp" @@ -25,7 +26,8 @@ BOOST_AUTO_TEST_SUITE(U_Base) BOOST_AUTO_TEST_SUITE(T_DeleteNodeCmd) BOOST_AUTO_TEST_CASE(test_delete_node_cmd) { - cout << "Base:: ...test_delete_node_cmd\n"; + ECF_NAME_THIS_TEST(); + TestLog test_log( "test_delete_node_cmd.log"); // will create log file, and destroy log and remove file at end of scope @@ -185,7 +187,7 @@ BOOST_AUTO_TEST_CASE(test_delete_node_cmd) { } BOOST_AUTO_TEST_CASE(test_delete_node_edit_history_ECFLOW_1684) { - cout << "Base:: ...test_delete_node_edit_history_ECFLOW_1684\n"; + ECF_NAME_THIS_TEST(); // This test will ensure that if a suite/family node is deleted, we *remove* any *OLD* edit history associated // with the node, AND and of its children diff --git a/libs/base/test/TestForceCmd.cpp b/libs/base/test/TestForceCmd.cpp index 2b9b76761..52e17ec5a 100644 --- a/libs/base/test/TestForceCmd.cpp +++ b/libs/base/test/TestForceCmd.cpp @@ -15,6 +15,7 @@ #include "MockServer.hpp" #include "MyDefsFixture.hpp" #include "TestHelper.hpp" +#include "TestNaming.hpp" #include "ecflow/base/cts/user/BeginCmd.hpp" #include "ecflow/base/cts/user/ForceCmd.hpp" #include "ecflow/base/cts/user/RequeueNodeCmd.hpp" @@ -48,7 +49,7 @@ BOOST_AUTO_TEST_CASE(test_add_log2) { } BOOST_AUTO_TEST_CASE(test_force_cmd) { - cout << "Base:: ...test_force_cmd\n"; + ECF_NAME_THIS_TEST(); defs_ptr the_defs = create_defs(); the_defs->beginAll(); @@ -149,7 +150,7 @@ doForce(MockServer& mockServer, Node* fnode, const std::string& stateOrEvent, co } BOOST_AUTO_TEST_CASE(test_force_cmd_recursive) { - cout << "Base:: ...test_force_cmd_recursive\n"; + ECF_NAME_THIS_TEST(); defs_ptr the_defs = create_defs(); node_ptr suite = the_defs->findAbsNode("/s1"); @@ -164,7 +165,7 @@ BOOST_AUTO_TEST_CASE(test_force_cmd_recursive) { } BOOST_AUTO_TEST_CASE(test_force_cmd_bubbles_up_state_changes) { - cout << "Base:: ...test_force_cmd_bubbles_up_state_changes\n"; + ECF_NAME_THIS_TEST(); defs_ptr the_defs = create_defs(); std::vector nodes; @@ -198,7 +199,7 @@ BOOST_AUTO_TEST_CASE(test_force_cmd_bubbles_up_state_changes) { } BOOST_AUTO_TEST_CASE(test_force_cmd_alias_does_not_bubble_up_state_changes) { - cout << "Base:: ...test_force_cmd_alias_does_not_bubble_up_state_changes\n"; + ECF_NAME_THIS_TEST(); defs_ptr the_defs = create_defs(); std::vector nodes; @@ -230,7 +231,7 @@ BOOST_AUTO_TEST_CASE(test_force_cmd_alias_does_not_bubble_up_state_changes) { } BOOST_AUTO_TEST_CASE(test_force_events) { - cout << "Base:: ...test_force_events\n"; + ECF_NAME_THIS_TEST(); MyDefsFixture fixtureDef; MockServer mockServer(&fixtureDef.defsfile_); @@ -268,7 +269,7 @@ BOOST_AUTO_TEST_CASE(test_force_events) { } BOOST_AUTO_TEST_CASE(test_force_events_errors) { - cout << "Base:: ...test_force_events_errors\n"; + ECF_NAME_THIS_TEST(); MyDefsFixture fixtureDef; MockServer mockServer(&fixtureDef.defsfile_); @@ -341,7 +342,7 @@ BOOST_AUTO_TEST_CASE(test_force_interactive) { // this functionality. What we want is that task is set to complete, without // forcing a re-queue, this is then propagated up the node tree. Which forces the // family to complete, and hence update the repeat variable. - cout << "Base:: ...test_force_interactive\n"; + ECF_NAME_THIS_TEST(); // suite s1 // family daily @@ -429,7 +430,7 @@ BOOST_AUTO_TEST_CASE(test_force_interactive_next_time_slot) { // This test is custom. When the user interactively forces a node to the complete state, // But where the user has a single time slot. We should stay complete and NOT requee // - cout << "Base:: ...test_force_interactive_next_time_slot\n"; + ECF_NAME_THIS_TEST(); // suite s1 // task t1 @@ -498,7 +499,7 @@ BOOST_AUTO_TEST_CASE(test_force_interactive_next_time_slot_1) { // end of the time slot. In which case the node should *not* re-queue and stay complete // // When the node is then re-queued check that the time has been correctly reset. - cout << "Base:: ...test_force_interactive_next_time_slot_1\n"; + ECF_NAME_THIS_TEST(); // suite s1 // task t1 @@ -622,7 +623,7 @@ BOOST_AUTO_TEST_CASE(test_force_interactive_next_time_slot_2) { // end of the time slot. In which case the node should *not* reque and stay complete // // When the node is then requeed check that the next time slot has been correctly reset. - cout << "Base:: ...test_force_interactive_next_time_slot_2\n"; + ECF_NAME_THIS_TEST(); // suite s1 // task t1 @@ -722,7 +723,7 @@ BOOST_AUTO_TEST_CASE(test_force_interactive_next_time_slot_3) { // end of the time slot. In which case the node should *not* re-queue and stay complete // // When the node is then re-queued check that the time has been correctly reset. - cout << "Base:: ...test_force_interactive_next_time_slot_3\n"; + ECF_NAME_THIS_TEST(); // suite s1 // task t1 @@ -833,7 +834,7 @@ BOOST_AUTO_TEST_CASE(test_force_interactive_next_time_slot_4) { // end of the time slot. In which case the node should *not* reque and stay complete // // When the node is then requeed check that the next time slot has been correctly reset. - cout << "Base:: ...test_force_interactive_next_time_slot_4\n"; + ECF_NAME_THIS_TEST(); // suite s1 // task t1 @@ -923,7 +924,7 @@ BOOST_AUTO_TEST_CASE(test_force_interactive_next_time_slot_for_cron) { // end of the time slot. // // When the node is then requeed check that the next time slot has been correctly reset. - cout << "Base:: ...test_force_interactive_next_time_slot_for_cron\n"; + ECF_NAME_THIS_TEST(); // suite s1 // task t1 @@ -1016,7 +1017,7 @@ BOOST_AUTO_TEST_CASE(test_force_interactive_next_time_slot_for_cron_on_family) { // end of the time slot. // // When the node is then requeed check that the next time slot has been correctly reset. - cout << "Base:: ...test_force_interactive_next_time_slot_for_cron_on_family\n"; + ECF_NAME_THIS_TEST(); // suite s1 // family diff --git a/libs/base/test/TestFreeDepCmd.cpp b/libs/base/test/TestFreeDepCmd.cpp index 2526d3c47..84b26fcb1 100644 --- a/libs/base/test/TestFreeDepCmd.cpp +++ b/libs/base/test/TestFreeDepCmd.cpp @@ -13,6 +13,7 @@ #include #include "MockServer.hpp" +#include "TestNaming.hpp" #include "ecflow/base/cts/user/FreeDepCmd.hpp" #include "ecflow/base/stc/ServerToClientCmd.hpp" #include "ecflow/node/Defs.hpp" @@ -31,7 +32,8 @@ BOOST_AUTO_TEST_SUITE(U_Base) BOOST_AUTO_TEST_SUITE(T_FreeDepCmd) BOOST_AUTO_TEST_CASE(test_free_dep_cmd) { - cout << "Base:: ...test_free_dep_cmd\n"; + ECF_NAME_THIS_TEST(); + TestLog test_log("test_free_dep_cmd.log"); // will create log file, and destroy log and remove file at end of scope // Create a test and add the date and time dependencies @@ -163,7 +165,8 @@ BOOST_AUTO_TEST_CASE(test_free_dep_cmd) { } BOOST_AUTO_TEST_CASE(test_free_dep_cmd_single_time_slot) { - cout << "Base:: ...test_free_dep_cmd_single_time_slot\n"; + ECF_NAME_THIS_TEST(); + TestLog test_log("test_free_dep_cmd_single_time_slot.log"); // will create log file, and destroy log and remove file // at end of scope @@ -221,7 +224,8 @@ BOOST_AUTO_TEST_CASE(test_free_dep_cmd_single_time_slot) { } BOOST_AUTO_TEST_CASE(test_free_dep_cmd_with_time_series) { - cout << "Base:: ...test_free_dep_cmd_with_time_series\n"; + ECF_NAME_THIS_TEST(); + TestLog test_log("test_free_dep_cmd_with_time_series.log"); // will create log file, and destroy log and remove file // at end of scope @@ -280,7 +284,8 @@ BOOST_AUTO_TEST_CASE(test_free_dep_cmd_with_time_series) { } BOOST_AUTO_TEST_CASE(test_free_dep_cmd_with_time_series_2) { - cout << "Base:: ...test_free_dep_cmd_with_time_series_2\n"; + ECF_NAME_THIS_TEST(); + TestLog test_log("test_free_dep_cmd_with_time_series_2.log"); // will create log file, and destroy log and remove // file at end of scope diff --git a/libs/base/test/TestInLimitAndLimit.cpp b/libs/base/test/TestInLimitAndLimit.cpp index bd83d47ef..f8791714b 100644 --- a/libs/base/test/TestInLimitAndLimit.cpp +++ b/libs/base/test/TestInLimitAndLimit.cpp @@ -15,6 +15,7 @@ #include #include "TestHelper.hpp" +#include "TestNaming.hpp" #include "ecflow/base/cts/user/BeginCmd.hpp" #include "ecflow/base/cts/user/ForceCmd.hpp" #include "ecflow/base/cts/user/RequeueNodeCmd.hpp" @@ -42,7 +43,8 @@ BOOST_AUTO_TEST_CASE(test_add_log) { } BOOST_AUTO_TEST_CASE(test_add_limit) { - cout << "Base:: ...test_add_limit\n"; + ECF_NAME_THIS_TEST(); + suite_ptr suite = Suite::create("suite"); suite->addLimit(Limit("fast", 1)); // " Adding limit first time should be ok"); BOOST_REQUIRE_THROW(suite->addLimit(Limit("fast", 1)), @@ -59,7 +61,7 @@ BOOST_AUTO_TEST_CASE(test_add_limit) { } BOOST_AUTO_TEST_CASE(test_limit_increment) { - cout << "Base:: ...test_limit_increment\n"; + ECF_NAME_THIS_TEST(); // Test than when a job is submitted multiple times, it should only consume 1 token // @@ -146,7 +148,7 @@ BOOST_AUTO_TEST_CASE(test_limit_increment) { // This TEST is used to test limit and inLimit. // Both examples taken from the documentation BOOST_AUTO_TEST_CASE(test_limit) { - cout << "Base:: ...test_limit\n"; + ECF_NAME_THIS_TEST(); /////////////////////////////////////////////////////////////////////////// // Create the defs file @@ -226,7 +228,8 @@ BOOST_AUTO_TEST_CASE(test_limit) { } BOOST_AUTO_TEST_CASE(test_limit1) { - cout << "Base:: ...test_limit1\n"; + ECF_NAME_THIS_TEST(); + //////////////////////////////////////////////////////////////////////////////////////////////////// // Create the defs file // suite suite @@ -319,7 +322,7 @@ BOOST_AUTO_TEST_CASE(test_limit_references_after_delete) { /// In-limit have a reference to a limit. This limit can be on another node. If that node is deleted /// The limits are also deleted, hence we need to ensure in-limit reference to limits that are being /// deleted are cleared. Currently we use shared_ptr to achieve this - cout << "Base:: ...test_limit_references_after_delete\n"; + ECF_NAME_THIS_TEST(); //////////////////////////////////////////////////////////////////////////////////////////////////// // Create the defs file @@ -415,7 +418,7 @@ BOOST_AUTO_TEST_CASE(test_limit_references_after_delete) { } BOOST_AUTO_TEST_CASE(test_limits_after_force_cmd) { - cout << "Base:: ...test_limits_after_force_cmd\n"; + ECF_NAME_THIS_TEST(); // Create the following defs // suite s1 @@ -528,7 +531,7 @@ BOOST_AUTO_TEST_CASE(test_limits_after_force_cmd) { } BOOST_AUTO_TEST_CASE(test_limits_after_requeue_family_ECFLOW_196) { - cout << "Base:: ...test_limits_after_requeue_family_ECFLOW_196\n"; + ECF_NAME_THIS_TEST(); // This test is used to ensure that, requeue causes node to release tokens held by the Limits @@ -648,7 +651,7 @@ BOOST_AUTO_TEST_CASE(test_limits_after_requeue_family_ECFLOW_196) { } BOOST_AUTO_TEST_CASE(test_limits_after_requeue_task_ECFLOW_196) { - cout << "Base:: ...test_limits_after_requeue_task_ECFLOW_196\n"; + ECF_NAME_THIS_TEST(); // This test is used to ensure that, requeue causes node to release tokens held by the Limits @@ -766,7 +769,7 @@ BOOST_AUTO_TEST_CASE(test_limits_after_requeue_task_ECFLOW_196) { } BOOST_AUTO_TEST_CASE(test_inlimit_with_family_ECFLOW_878) { - cout << "Base:: ...test_inlimit_with_family_ECFLOW_878\n"; + ECF_NAME_THIS_TEST(); // This test places a limit on the families. Should ignore the tasks // With this test only 1 family can start at a time @@ -988,7 +991,7 @@ BOOST_AUTO_TEST_CASE(test_inlimit_with_family_ECFLOW_878) { } BOOST_AUTO_TEST_CASE(test_inlimit_ECFLOW_878) { - cout << "Base:: ...test_inlimit_ECFLOW_878\n"; + ECF_NAME_THIS_TEST(); // This test places a limit on the families. Should ignore the tasks // With this test only 1 family can start at a time. @@ -1188,7 +1191,7 @@ BOOST_AUTO_TEST_CASE(test_inlimit_ECFLOW_878) { } BOOST_AUTO_TEST_CASE(test_inlimit_submission_only) { - cout << "Base:: ...test_inlimit_submission_only \n"; + ECF_NAME_THIS_TEST(); // Create the following def. with inlimit -s, we limit submission // suite s0 diff --git a/libs/base/test/TestLogCmd.cpp b/libs/base/test/TestLogCmd.cpp index 05bf03739..0ca713645 100644 --- a/libs/base/test/TestLogCmd.cpp +++ b/libs/base/test/TestLogCmd.cpp @@ -11,6 +11,7 @@ #include #include "TestHelper.hpp" +#include "TestNaming.hpp" #include "ecflow/base/cts/user/LogCmd.hpp" #include "ecflow/core/File.hpp" #include "ecflow/core/Log.hpp" @@ -26,7 +27,7 @@ BOOST_AUTO_TEST_SUITE(U_Base) BOOST_AUTO_TEST_SUITE(T_LogCmd) BOOST_AUTO_TEST_CASE(test_log_cmd) { - cout << "Base:: ...test_log_cmd\n"; + ECF_NAME_THIS_TEST(); { LogCmd log_cmd; diff --git a/libs/base/test/TestMeterCmd.cpp b/libs/base/test/TestMeterCmd.cpp index 70c3399fa..3bf081258 100644 --- a/libs/base/test/TestMeterCmd.cpp +++ b/libs/base/test/TestMeterCmd.cpp @@ -14,6 +14,7 @@ #include #include "TestHelper.hpp" +#include "TestNaming.hpp" #include "ecflow/base/cts/task/MeterCmd.hpp" #include "ecflow/node/Defs.hpp" #include "ecflow/node/Family.hpp" @@ -29,7 +30,8 @@ BOOST_AUTO_TEST_SUITE(U_Base) BOOST_AUTO_TEST_SUITE(T_MeterCmd) BOOST_AUTO_TEST_CASE(test_meter_cmd) { - cout << "Base:: ...test_meter_cmd\n"; + ECF_NAME_THIS_TEST(); + TestLog test_log("test_meter_cmd.log"); // will create log file, and destroy log and remove file at end of scope // Create the defs file. diff --git a/libs/base/test/TestProgramOptions.cpp b/libs/base/test/TestProgramOptions.cpp index 380098f94..cacc1172f 100644 --- a/libs/base/test/TestProgramOptions.cpp +++ b/libs/base/test/TestProgramOptions.cpp @@ -14,6 +14,8 @@ #include #include +#include "TestNaming.hpp" + using namespace std; namespace po = boost::program_options; @@ -22,7 +24,7 @@ BOOST_AUTO_TEST_SUITE(U_Base) BOOST_AUTO_TEST_SUITE(T_ProgramOptions) BOOST_AUTO_TEST_CASE(test_program_options_implicit_value) { - cout << "Base:: ...test_program_options_implicit_value\n"; + ECF_NAME_THIS_TEST(); // Declare the supported options. po::options_description desc("Allowed options"); @@ -85,7 +87,7 @@ BOOST_AUTO_TEST_CASE(test_program_options_implicit_value) { } BOOST_AUTO_TEST_CASE(test_program_options_multitoken) { - cout << "Base:: ...test_program_options_multitoken\n"; + ECF_NAME_THIS_TEST(); // Declare the supported options. po::options_description desc("Allowed options"); @@ -112,7 +114,7 @@ BOOST_AUTO_TEST_CASE(test_program_options_multitoken) { } BOOST_AUTO_TEST_CASE(test_program_options_multitoken_with_negative_values) { - cout << "Base:: ...test_program_options_multitoken_with_negative_values\n"; + ECF_NAME_THIS_TEST(); // Declare the supported options. po::options_description desc("Allowed options"); diff --git a/libs/base/test/TestQueryCmd.cpp b/libs/base/test/TestQueryCmd.cpp index 60bf666fc..4c8fbf6fa 100644 --- a/libs/base/test/TestQueryCmd.cpp +++ b/libs/base/test/TestQueryCmd.cpp @@ -13,6 +13,7 @@ #include #include "TestHelper.hpp" +#include "TestNaming.hpp" #include "ecflow/base/cts/task/LabelCmd.hpp" #include "ecflow/base/cts/user/PathsCmd.hpp" #include "ecflow/base/cts/user/QueryCmd.hpp" @@ -31,7 +32,8 @@ BOOST_AUTO_TEST_SUITE(U_Base) BOOST_AUTO_TEST_SUITE(T_QueryCmd) BOOST_AUTO_TEST_CASE(test_query_cmd) { - cout << "Base:: ...test_query_cmd\n"; + ECF_NAME_THIS_TEST(); + TestLog test_log("test_query_cmd.log"); // will create log file, and destroy log and remove file at end of scope // Create the defs file. diff --git a/libs/base/test/TestQueueCmd.cpp b/libs/base/test/TestQueueCmd.cpp index 15c08b8a4..4dc1843c2 100644 --- a/libs/base/test/TestQueueCmd.cpp +++ b/libs/base/test/TestQueueCmd.cpp @@ -14,6 +14,7 @@ #include #include "TestHelper.hpp" +#include "TestNaming.hpp" #include "ecflow/attribute/QueueAttr.hpp" #include "ecflow/base/cts/task/QueueCmd.hpp" #include "ecflow/node/Defs.hpp" @@ -30,7 +31,8 @@ BOOST_AUTO_TEST_SUITE(U_Base) BOOST_AUTO_TEST_SUITE(T_QueueCmd) BOOST_AUTO_TEST_CASE(test_queue_cmd) { - cout << "Base:: ...test_queue_cmd\n"; + ECF_NAME_THIS_TEST(); + TestLog test_log("test_queue_cmd.log"); // will create log file, and destroy log and remove file at end of scope // Create the defs file. diff --git a/libs/base/test/TestRequest.cpp b/libs/base/test/TestRequest.cpp index 9e074f9cb..ce4d36acc 100644 --- a/libs/base/test/TestRequest.cpp +++ b/libs/base/test/TestRequest.cpp @@ -12,6 +12,7 @@ #include "MyDefsFixture.hpp" #include "TestHelper.hpp" +#include "TestNaming.hpp" #include "ecflow/base/ServerToClientResponse.hpp" #include "ecflow/base/cts/task/AbortCmd.hpp" #include "ecflow/base/cts/task/CompleteCmd.hpp" @@ -442,7 +443,8 @@ static void test_persistence(const Defs& theFixtureDefs) { } BOOST_AUTO_TEST_CASE(test_all_request_persistence_text) { - cout << "Base:: ...test_all_request_persistence_text\n"; + ECF_NAME_THIS_TEST(); + TestLog test_log("test_all_request_persistence_text.log"); // will create log file, and destroy log and remove file // at end of scope @@ -450,7 +452,8 @@ BOOST_AUTO_TEST_CASE(test_all_request_persistence_text) { } BOOST_AUTO_TEST_CASE(test_request_authenticate) { - cout << "Base:: ...test_request_authenticate\n"; + ECF_NAME_THIS_TEST(); + TestLog test_log( "test_request_authenticate.log"); // will create log file, and destroy log and remove file at end of scope diff --git a/libs/base/test/TestRequeueNodeCmd.cpp b/libs/base/test/TestRequeueNodeCmd.cpp index bf10a5002..fe60b9f78 100644 --- a/libs/base/test/TestRequeueNodeCmd.cpp +++ b/libs/base/test/TestRequeueNodeCmd.cpp @@ -11,6 +11,7 @@ #include #include "TestHelper.hpp" +#include "TestNaming.hpp" #include "ecflow/base/cts/user/AlterCmd.hpp" #include "ecflow/base/cts/user/ForceCmd.hpp" #include "ecflow/base/cts/user/PathsCmd.hpp" @@ -33,7 +34,8 @@ BOOST_AUTO_TEST_SUITE(U_Base) BOOST_AUTO_TEST_SUITE(T_RequeueNodeCmd) BOOST_AUTO_TEST_CASE(test_requeue_with_suspend) { - cout << "Base:: ...test_requeue_with_suspend\n"; + ECF_NAME_THIS_TEST(); + TestLog test_log( "test_requeue_with_suspend.log"); // will create log file, and destroy log and remove file at end of scope @@ -75,7 +77,8 @@ BOOST_AUTO_TEST_CASE(test_requeue_with_suspend) { } BOOST_AUTO_TEST_CASE(test_requeue_family_clears_children_SUP_909) { - cout << "Base:: ...test_requeue_family_clears_children_SUP_909\n"; + ECF_NAME_THIS_TEST(); + TestLog test_log("test_requeue_family_clears_children_SUP_909.log"); // will create log file, and destroy log and // remove file at end of scope @@ -121,7 +124,8 @@ BOOST_AUTO_TEST_CASE(test_requeue_family_clears_children_SUP_909) { } BOOST_AUTO_TEST_CASE(test_repeat_based_requeue_clears_children) { - cout << "Base:: ...test_repeat_based_requeue_clears_children\n"; + ECF_NAME_THIS_TEST(); + TestLog test_log("test_repeat_based_requeue_clears_children.log"); // will create log file, and destroy log and // remove file at end of scope @@ -165,7 +169,8 @@ BOOST_AUTO_TEST_CASE(test_repeat_based_requeue_clears_children) { } BOOST_AUTO_TEST_CASE(test_ecflow_359) { - cout << "Base:: ...test_ECFLOW-359\n"; + ECF_NAME_THIS_TEST(); + TestLog test_log("test_ecflow_359.log"); // will create log file, and destroy log and remove file at end of scope // suite s1 @@ -225,7 +230,8 @@ BOOST_AUTO_TEST_CASE(test_ecflow_359) { } BOOST_AUTO_TEST_CASE(test_ecflow_428) { - cout << "Base:: ...test_ECFLOW-428\n"; + ECF_NAME_THIS_TEST(); + TestLog test_log("test_ecflow_428.log"); // will create log file, and destroy log and remove file at end of scope // suite s1 @@ -272,7 +278,8 @@ BOOST_AUTO_TEST_CASE(test_ecflow_428) { } BOOST_AUTO_TEST_CASE(test_repeat_based_requeue_resets_relative_duration) { - cout << "Base:: ...test_repeat_based_requeue_resets_relative_duration\n"; + ECF_NAME_THIS_TEST(); + TestLog test_log("test_repeat_based_requeue_resets_relative_duration.log"); // will create log file, and destroy log // and remove file at end of scope @@ -320,7 +327,7 @@ BOOST_AUTO_TEST_CASE(test_repeat_based_requeue_resets_relative_duration) { } BOOST_AUTO_TEST_CASE(test_reque_with_repeat_and_defstatus_complete) { - cout << "Base:: ...test_reque_with_repeat_and_defstatus_complete\n"; + ECF_NAME_THIS_TEST(); // This will test that when we have a family with a repeat AND defstatus complete // We ONLY log the state change complete in the log file when re-queuing diff --git a/libs/base/test/TestResolveDependencies.cpp b/libs/base/test/TestResolveDependencies.cpp index 7a544df65..f148a0df8 100644 --- a/libs/base/test/TestResolveDependencies.cpp +++ b/libs/base/test/TestResolveDependencies.cpp @@ -13,6 +13,7 @@ #include #include "TestHelper.hpp" +#include "TestNaming.hpp" #include "ecflow/base/cts/task/MeterCmd.hpp" #include "ecflow/base/cts/user/BeginCmd.hpp" #include "ecflow/base/cts/user/CtsCmd.hpp" @@ -33,7 +34,8 @@ BOOST_AUTO_TEST_SUITE(U_Base) BOOST_AUTO_TEST_SUITE(T_ResolveDependencies) BOOST_AUTO_TEST_CASE(test_resolve_dependencies) { - cout << "Base:: ...test_resolve_dependencies\n"; + ECF_NAME_THIS_TEST(); + TestLog test_log( "test_resolve_dependencies.log"); // will create log file, and destroy log and remove file at end of scope @@ -154,7 +156,8 @@ BOOST_AUTO_TEST_CASE(test_resolve_dependencies) { } BOOST_AUTO_TEST_CASE(test_trigger_after_delete) { - cout << "Base:: ...test_trigger_after_delete\n"; + ECF_NAME_THIS_TEST(); + //////////////////////////////////////////////////////////////////////////////////////////////////// // Create the defs file // suite suite1 # the limit we want delete diff --git a/libs/base/test/TestSSyncCmd.cpp b/libs/base/test/TestSSyncCmd.cpp index ad3c9a552..b07a4b646 100644 --- a/libs/base/test/TestSSyncCmd.cpp +++ b/libs/base/test/TestSSyncCmd.cpp @@ -13,6 +13,7 @@ #include "MockServer.hpp" #include "MyDefsFixture.hpp" #include "TestHelper.hpp" +#include "TestNaming.hpp" #include "ecflow/base/cts/user/AlterCmd.hpp" #include "ecflow/base/cts/user/DeleteCmd.hpp" #include "ecflow/base/cts/user/OrderNodeCmd.hpp" @@ -438,7 +439,8 @@ void set_defs_state(defs_ptr defs) { BOOST_AUTO_TEST_CASE(test_ssync_cmd) { // To DEBUG: enable the defines in Memento.hpp - cout << "Base:: ...test_ssync_cmd\n"; + ECF_NAME_THIS_TEST(); + TestLog test_log("test_ssync_cmd.log"); // will create log file, and destroy log and remove file at end of scope test_sync_scaffold(update_repeat, "update_repeat"); diff --git a/libs/base/test/TestSSyncCmdOrder.cpp b/libs/base/test/TestSSyncCmdOrder.cpp index fee578b44..3cd943d3e 100644 --- a/libs/base/test/TestSSyncCmdOrder.cpp +++ b/libs/base/test/TestSSyncCmdOrder.cpp @@ -12,6 +12,7 @@ #include "MockServer.hpp" #include "TestHelper.hpp" +#include "TestNaming.hpp" #include "ecflow/base/cts/user/ClientHandleCmd.hpp" #include "ecflow/base/cts/user/OrderNodeCmd.hpp" #include "ecflow/base/stc/SSyncCmd.hpp" @@ -231,7 +232,8 @@ static void reorder_family_using_handles(defs_ptr theDefs) { } BOOST_AUTO_TEST_CASE(test_ssync_cmd_test_order) { - cout << "Base:: ...test_ssync_cmd_test_order\n"; + ECF_NAME_THIS_TEST(); + TestLog test_log( "test_ssync_cmd_test_order.log"); // will create log file, and destroy log and remove file at end of scope diff --git a/libs/base/test/TestSSyncCmd_CH1.cpp b/libs/base/test/TestSSyncCmd_CH1.cpp index 0070de222..2f588d4fd 100644 --- a/libs/base/test/TestSSyncCmd_CH1.cpp +++ b/libs/base/test/TestSSyncCmd_CH1.cpp @@ -12,6 +12,7 @@ #include "MockServer.hpp" #include "TestHelper.hpp" +#include "TestNaming.hpp" #include "ecflow/base/cts/user/AlterCmd.hpp" #include "ecflow/base/cts/user/ClientHandleCmd.hpp" #include "ecflow/base/stc/SNewsCmd.hpp" @@ -525,7 +526,8 @@ static bool s0_update_repeat(defs_ptr defs) { } BOOST_AUTO_TEST_CASE(test_ssync_using_handle) { - cout << "Base:: ...test_ssync_using_handle\n"; + ECF_NAME_THIS_TEST(); + TestLog test_log( "test_ssync_using_handle.log"); // will create log file, and destroy log and remove file at end of scope @@ -604,7 +606,8 @@ BOOST_AUTO_TEST_CASE(test_ssync_full_sync_using_handle) { /// local change numbers to be the same as the global change numbers /// This is important since the NewsCmd must be in *SYNC* with SYNCCmd - cout << "Base:: ...test_ssync_full_sync_using_handle\n"; + ECF_NAME_THIS_TEST(); + TestLog test_log("test_ssync_full_sync_using_handle.log"); // will create log file, and destroy log and remove file // at end of scope @@ -618,10 +621,9 @@ BOOST_AUTO_TEST_CASE(test_ssync_full_sync_using_handle) { // Server & client should be the same, since we ignore change numbers in the comparison DebugEquality debug_equality; // only as affect in DEBUG build BOOST_CHECK_MESSAGE(*server_defs == *server_reply.client_defs(), - "Starting point client and server defs should be the same" - << "SERVER\n" - << server_defs << "CLIENT\n" - << server_reply.client_defs()); + "Starting point client and server defs should be the same" << "SERVER\n" + << server_defs << "CLIENT\n" + << server_reply.client_defs()); /// register interest in **ALL** the suites std::vector suite_names; diff --git a/libs/base/test/TestSpecificIssues.cpp b/libs/base/test/TestSpecificIssues.cpp index db6028e11..a12efc90f 100644 --- a/libs/base/test/TestSpecificIssues.cpp +++ b/libs/base/test/TestSpecificIssues.cpp @@ -11,6 +11,7 @@ #include #include "TestHelper.hpp" +#include "TestNaming.hpp" #include "ecflow/base/cts/user/PathsCmd.hpp" #include "ecflow/node/Defs.hpp" #include "ecflow/node/Family.hpp" @@ -50,7 +51,8 @@ static defs_ptr create_defs() { } BOOST_AUTO_TEST_CASE(test_ECFLOW_189) { - cout << "Base:: ...test_ECFLOW_189\n"; + ECF_NAME_THIS_TEST(); + TestLog test_log("test_ECFLOW_189.log"); // will create log file, and destroy log and remove file at end of scope defs_ptr the_defs = create_defs(); diff --git a/libs/base/test/TestStatsCmd.cpp b/libs/base/test/TestStatsCmd.cpp index fcd25e976..032f5b4af 100644 --- a/libs/base/test/TestStatsCmd.cpp +++ b/libs/base/test/TestStatsCmd.cpp @@ -12,6 +12,7 @@ #include "MockServer.hpp" #include "MyDefsFixture.hpp" +#include "TestNaming.hpp" #include "ecflow/base/ClientToServerRequest.hpp" #include "ecflow/base/cts/user/CtsCmd.hpp" #include "ecflow/base/stc/ServerToClientCmd.hpp"