Ticket #6235: dry_run.patch
File dry_run.patch, 3.3 KB (added by , 11 years ago) |
---|
-
boost/test/impl/unit_test_parameters.ipp
160 160 std::string CATCH_SYS_ERRORS = "catch_system_errors"; 161 161 std::string DETECT_FP_EXCEPT = "detect_fp_exceptions"; 162 162 std::string DETECT_MEM_LEAKS = "detect_memory_leaks"; 163 std::string DRY_RUN = "dry_run"; 163 164 std::string LOG_FORMAT = "log_format"; 164 165 std::string LOG_LEVEL = "log_level"; 165 166 std::string LOG_SINK = "log_sink"; … … 181 182 CATCH_SYS_ERRORS , "BOOST_TEST_CATCH_SYSTEM_ERRORS", 182 183 DETECT_FP_EXCEPT , "BOOST_TEST_DETECT_FP_EXCEPTIONS", 183 184 DETECT_MEM_LEAKS , "BOOST_TEST_DETECT_MEMORY_LEAK", 185 DRY_RUN , "BOOST_TEST_DRY_RUN", 184 186 LOG_FORMAT , "BOOST_TEST_LOG_FORMAT", 185 187 LOG_LEVEL , "BOOST_TEST_LOG_LEVEL", 186 188 LOG_SINK , "BOOST_TEST_LOG_SINK", … … 267 269 << cla::named_parameter<long>( DETECT_MEM_LEAKS ) 268 270 - (cla::prefix = "--",cla::separator = "=",cla::guess_name,cla::optional, 269 271 cla::description = "Allows to switch between catching and ignoring memory leaks") 272 << cla::dual_name_parameter<bool>( DRY_RUN + "|n" ) 273 - (cla::prefix = "--|-",cla::separator = "=| ",cla::guess_name,cla::optional, 274 cla::description = "Does not run the tests and assumes they all succeed") 270 275 << cla::dual_name_parameter<unit_test::output_format>( LOG_FORMAT + "|f" ) 271 276 - (cla::prefix = "--|-",cla::separator = "=| ",cla::guess_name,cla::optional, 272 277 cla::description = "Specifies log format") … … 514 519 515 520 //____________________________________________________________________________// 516 521 522 bool 523 dry_run() 524 { 525 return retrieve_parameter( DRY_RUN, s_cla_parser, false ); 526 } 527 528 //____________________________________________________________________________// 529 517 530 } // namespace runtime_config 518 531 519 532 } // namespace unit_test -
boost/test/impl/unit_test_monitor.ipp
66 66 p_use_alt_stack.value = runtime_config::use_alt_stack(); 67 67 p_detect_fp_exceptions.value = runtime_config::detect_fp_exceptions(); 68 68 69 execute( callback0<int>( zero_return_wrapper( tc.test_func() ) ) ); 69 if ( !runtime_config::dry_run() ) 70 execute( callback0<int>( zero_return_wrapper( tc.test_func() ) ) ); 70 71 } 71 72 catch( execution_exception const& ex ) { 72 73 framework::exception_caught( ex ); -
boost/test/detail/unit_test_parameters.hpp
55 55 BOOST_TEST_DECL std::ostream* log_sink(); 56 56 BOOST_TEST_DECL long detect_memory_leaks(); 57 57 BOOST_TEST_DECL int random_seed(); 58 BOOST_TEST_DECL bool dry_run(); 58 59 59 60 } // namespace runtime_config 60 61