Index: boost/test/impl/unit_test_parameters.ipp =================================================================== --- boost/test/impl/unit_test_parameters.ipp (revision 15430) +++ boost/test/impl/unit_test_parameters.ipp (revision 15431) @@ -160,6 +160,7 @@ std::string CATCH_SYS_ERRORS = "catch_system_errors"; std::string DETECT_FP_EXCEPT = "detect_fp_exceptions"; std::string DETECT_MEM_LEAKS = "detect_memory_leaks"; +std::string DRY_RUN = "dry_run"; std::string LOG_FORMAT = "log_format"; std::string LOG_LEVEL = "log_level"; std::string LOG_SINK = "log_sink"; @@ -181,6 +182,7 @@ CATCH_SYS_ERRORS , "BOOST_TEST_CATCH_SYSTEM_ERRORS", DETECT_FP_EXCEPT , "BOOST_TEST_DETECT_FP_EXCEPTIONS", DETECT_MEM_LEAKS , "BOOST_TEST_DETECT_MEMORY_LEAK", + DRY_RUN , "BOOST_TEST_DRY_RUN", LOG_FORMAT , "BOOST_TEST_LOG_FORMAT", LOG_LEVEL , "BOOST_TEST_LOG_LEVEL", LOG_SINK , "BOOST_TEST_LOG_SINK", @@ -267,6 +269,9 @@ << cla::named_parameter( DETECT_MEM_LEAKS ) - (cla::prefix = "--",cla::separator = "=",cla::guess_name,cla::optional, cla::description = "Allows to switch between catching and ignoring memory leaks") + << cla::dual_name_parameter( DRY_RUN + "|n" ) + - (cla::prefix = "--|-",cla::separator = "=| ",cla::guess_name,cla::optional, + cla::description = "Does not run the tests and assumes they all succeed") << cla::dual_name_parameter( LOG_FORMAT + "|f" ) - (cla::prefix = "--|-",cla::separator = "=| ",cla::guess_name,cla::optional, cla::description = "Specifies log format") @@ -514,6 +519,14 @@ //____________________________________________________________________________// +bool +dry_run() +{ + return retrieve_parameter( DRY_RUN, s_cla_parser, false ); +} + +//____________________________________________________________________________// + } // namespace runtime_config } // namespace unit_test Index: boost/test/impl/unit_test_monitor.ipp =================================================================== --- boost/test/impl/unit_test_monitor.ipp (revision 15430) +++ boost/test/impl/unit_test_monitor.ipp (revision 15431) @@ -66,7 +66,8 @@ p_use_alt_stack.value = runtime_config::use_alt_stack(); p_detect_fp_exceptions.value = runtime_config::detect_fp_exceptions(); - execute( callback0( zero_return_wrapper( tc.test_func() ) ) ); + if ( !runtime_config::dry_run() ) + execute( callback0( zero_return_wrapper( tc.test_func() ) ) ); } catch( execution_exception const& ex ) { framework::exception_caught( ex ); Index: boost/test/detail/unit_test_parameters.hpp =================================================================== --- boost/test/detail/unit_test_parameters.hpp (revision 15430) +++ boost/test/detail/unit_test_parameters.hpp (revision 15431) @@ -55,6 +55,7 @@ BOOST_TEST_DECL std::ostream* log_sink(); BOOST_TEST_DECL long detect_memory_leaks(); BOOST_TEST_DECL int random_seed(); +BOOST_TEST_DECL bool dry_run(); } // namespace runtime_config