]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/test/test/framework-ts/message-in-datatestcase-test.cpp
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / boost / libs / test / test / framework-ts / message-in-datatestcase-test.cpp
index 19686eb52477484121dc02a27c4970634ce40e72..1da0d9fb32ddb544aacf4a75f182e60fa5a539ac 100644 (file)
@@ -50,30 +50,26 @@ void check_pattern_loggers(
     bool bt_module_failed = false,
     log_level ll = log_successful_tests )
 {
-    boost::unit_test::unit_test_log.set_format(log_format);
-    boost::unit_test::unit_test_log.set_stream(output);
-    boost::unit_test::unit_test_log.set_threshold_level(ll);
+    {
+      log_setup_teardown holder(output, log_format, ll);
 
-    // output before fixture registration
-    output << "* " << log_format << "-format  *******************************************************************";
-    output << std::endl;
+      // output before fixture registration
+      output << "* " << log_format << "-format  *******************************************************************";
+      output << std::endl;
 
-    framework::finalize_setup_phase( id );
+      framework::finalize_setup_phase( id );
 
-    bool setup_error_caught = false;
-    try {
-        framework::run( id, false ); // do not continue the test tree to have the test_log_start/end
-    }
-    catch (framework::setup_error&) {
-        BOOST_TEST_MESSAGE("Framework setup_error caught");
-        setup_error_caught = true;
-    }
+      bool setup_error_caught = false;
+      try {
+          framework::run( id, false ); // do not continue the test tree to have the test_log_start/end
+      }
+      catch (framework::setup_error&) {
+          BOOST_TEST_MESSAGE("Framework setup_error caught");
+          setup_error_caught = true;
+      }
 
-    output << std::endl;
-
-    // we do not want the result of the comparison go to the "output" stream
-    boost::unit_test::unit_test_log.set_format(OF_CLF);
-    boost::unit_test::unit_test_log.set_stream(std::cout);
+      output << std::endl;
+    }
 
     BOOST_TEST( bt_module_failed == (( results_collector.results( id ).result_code() != 0 ) ));
     BOOST_TEST( output.match_pattern(true) ); // flushes the stream at the end of the comparison.