More COM related tests, measure speed of some of the test runs

This commit is contained in:
Antony Polukhin
2017-04-19 22:25:59 +03:00
parent a6521b2b40
commit a6bdf54c85
2 changed files with 63 additions and 11 deletions

View File

@@ -13,10 +13,10 @@ lib ole32 ;
local LIBBACKTRACE_PATH = [ modules.peek : LIBBACKTRACE_PATH ] ;
lib backtrace
:
:
: <search>$(LIBBACKTRACE_PATH)/lib <link>static
:
: <include>$(LIBBACKTRACE_PATH)/include
: <include>$(LIBBACKTRACE_PATH)/include
;
@@ -89,11 +89,27 @@ test-suite stacktrace_tests
[ run test.cpp : : : <debug-symbols>on <library>.//test_impl_lib_basic $(LINKSHARED_BASIC) : basic_lib ]
# Thread safety with debug symbols
[ run thread_safety_checking.cpp : : : <debug-symbols>on <library>/boost/thread//boost_thread <library>.//test_impl_lib_backtrace $(LINKSHARED_BT) : backtrace_lib_threaded ]
[ run thread_safety_checking.cpp : : : <debug-symbols>on <library>/boost/thread//boost_thread <library>.//test_impl_lib_windbg $(LINKSHARED_WIND) : windbg_lib_threaded ]
[ run thread_safety_checking.cpp : : : <debug-symbols>on <library>/boost/thread//boost_thread <library>.//test_impl_lib_windbg_cached $(LINKSHARED_WIND_CACHED) : windbg_cached_lib_threaded ]
[ run thread_safety_checking.cpp : : : <debug-symbols>on <library>/boost/thread//boost_thread <library>.//test_impl_lib_basic $(LINKSHARED_BASIC) : basic_lib_threaded ]
[ run thread_safety_checking.cpp
: : : <debug-symbols>on <library>/boost/thread//boost_thread <library>/boost/timer//boost_timer <library>.//test_impl_lib_backtrace $(LINKSHARED_BT)
: backtrace_lib_threaded ]
[ run thread_safety_checking.cpp
: : : <debug-symbols>on <library>/boost/thread//boost_thread <library>/boost/timer//boost_timer <library>.//test_impl_lib_windbg $(LINKSHARED_WIND)
: windbg_lib_threaded ]
[ run thread_safety_checking.cpp
: : : <debug-symbols>on <library>/boost/thread//boost_thread <library>/boost/timer//boost_timer <library>.//test_impl_lib_windbg_cached $(LINKSHARED_WIND_CACHED)
: windbg_cached_lib_threaded ]
[ run thread_safety_checking.cpp
: : : <debug-symbols>on <library>/boost/thread//boost_thread <library>/boost/timer//boost_timer <library>.//test_impl_lib_basic $(LINKSHARED_BASIC)
: basic_lib_threaded ]
[ run thread_safety_checking.cpp
: : : <debug-symbols>on <library>/boost/thread//boost_thread <library>/boost/timer//boost_timer <library>.//test_impl_lib_windbg
$(LINKSHARED_WIND) <define>BOOST_STACKTRACE_TEST_COM_PREINIT_MT
: windbg_lib_threaded_com_mt ]
[ run thread_safety_checking.cpp
: : : <debug-symbols>on <library>/boost/thread//boost_thread <library>/boost/timer//boost_timer <library>.//test_impl_lib_windbg_cached
$(LINKSHARED_WIND_CACHED) <define>BOOST_STACKTRACE_TEST_COM_PREINIT_ST
: windbg_cached_lib_threaded_com_st ]
##### Tests with disabled debug symbols #####
@@ -114,13 +130,30 @@ test-suite stacktrace_tests
[ run test.cpp : : : <debug-symbols>off <library>.//test_impl_lib_basic_no_dbg $(LINKSHARED_BASIC) : basic_lib_no_dbg ]
# Thread safety without debug symbols
[ run thread_safety_checking.cpp : : : <debug-symbols>off <library>/boost/thread//boost_thread <library>.//test_impl_lib_backtrace_no_dbg $(LINKSHARED_BT) : backtrace_lib_no_dbg_threaded ]
[ run thread_safety_checking.cpp : : : <debug-symbols>off <library>/boost/thread//boost_thread <library>.//test_impl_lib_windbg_no_dbg $(LINKSHARED_WIND) : windbg_lib_no_dbg_threaded ]
[ run thread_safety_checking.cpp : : : <debug-symbols>off <library>/boost/thread//boost_thread <library>.//test_impl_lib_windbg_cached_no_dbg $(LINKSHARED_WIND_CACHED) : windbg_cached_lib_no_dbg_threaded ]
[ run thread_safety_checking.cpp : : : <debug-symbols>off <library>/boost/thread//boost_thread <library>.//test_impl_lib_basic_no_dbg $(LINKSHARED_BASIC) : basic_lib_no_dbg_threaded ]
[ run thread_safety_checking.cpp
: : : <debug-symbols>off <library>/boost/thread//boost_thread <library>/boost/timer//boost_timer <library>.//test_impl_lib_backtrace_no_dbg $(LINKSHARED_BT)
: backtrace_lib_no_dbg_threaded ]
[ run thread_safety_checking.cpp
: : : <debug-symbols>off <library>/boost/thread//boost_thread <library>/boost/timer//boost_timer <library>.//test_impl_lib_windbg_no_dbg $(LINKSHARED_WIND)
: windbg_lib_no_dbg_threaded ]
[ run thread_safety_checking.cpp
: : : <debug-symbols>off <library>/boost/thread//boost_thread <library>/boost/timer//boost_timer <library>.//test_impl_lib_windbg_cached_no_dbg $(LINKSHARED_WIND_CACHED)
: windbg_cached_lib_no_dbg_threaded ]
[ run thread_safety_checking.cpp
: : : <debug-symbols>off <library>/boost/thread//boost_thread <library>/boost/timer//boost_timer <library>.//test_impl_lib_basic_no_dbg $(LINKSHARED_BASIC)
: basic_lib_no_dbg_threaded ]
[ run thread_safety_checking.cpp
: : : <debug-symbols>off <library>/boost/thread//boost_thread <library>/boost/timer//boost_timer <library>.//test_impl_lib_windbg
$(LINKSHARED_WIND) <define>BOOST_STACKTRACE_TEST_COM_PREINIT_MT
: windbg_lib_threaded_com_mt ]
[ run thread_safety_checking.cpp
: : : <debug-symbols>off <library>/boost/thread//boost_thread <library>/boost/timer//boost_timer <library>.//test_impl_lib_windbg_cached
$(LINKSHARED_WIND_CACHED) <define>BOOST_STACKTRACE_TEST_COM_PREINIT_ST
: windbg_cached_lib_threaded_com_st ]
;
# Assuring that examples compile and run. Adding sources from `examples` directory to the `type_index` test suite.
# Assuring that examples compile and run. Adding sources from `examples` directory to the `type_index` test suite.
for local p in [ glob ../example/*.cpp ]
{
local target_name = $(p[1]:B) ;

View File

@@ -13,6 +13,8 @@
#include <boost/optional.hpp>
#include <boost/core/lightweight_test.hpp>
#include <boost/timer/timer.hpp>
#ifdef BOOST_STACKTRACE_DYN_LINK
# define BOOST_ST_API BOOST_SYMBOL_IMPORT
#else
@@ -61,7 +63,20 @@ void main_test_loop() {
}
}
#if defined(BOOST_STACKTRACE_TEST_COM_PREINIT_MT) || defined(BOOST_STACKTRACE_TEST_COM_PREINIT_ST)
# include <windows.h>
# include "dbgeng.h"
#endif
int main() {
#if defined(BOOST_STACKTRACE_TEST_COM_PREINIT_MT)
::CoInitializeEx(0, COINIT_MULTITHREADED);
#elif defined(BOOST_STACKTRACE_TEST_COM_PREINIT_ST)
::CoInitializeEx(0, COINIT_APARTMENTTHREADED);
#endif
boost::timer::auto_cpu_timer t;
boost::thread t1(main_test_loop);
boost::thread t2(main_test_loop);
boost::thread t3(main_test_loop);
@@ -71,5 +86,9 @@ int main() {
t2.join();
t3.join();
#if defined(BOOST_STACKTRACE_TEST_COM_PREINIT_MT) || defined(BOOST_STACKTRACE_TEST_COM_PREINIT_ST)
::CoUninitialize();
#endif
return boost::report_errors();
}