Boost C++ Libraries: Ticket #3527: Make Boost.Test more dll/so-friendly https://svn.boost.org/trac10/ticket/3527 <p> We've been using Boost.Test 1.40 to run unit tests for our project. The project is quite scaled and it consists from a number of shared objects (dll on Windows, so on Linux) that have to be dynamically loadable/unloadable. Some shared objects also contain self-testing code based on Boost.Test (with auto-test cases, exception translators, fixtures, checking macros, etc.) that is run by our own means (eventually, it comes down to call to boost::unit_test::unit_test_main). All such dlls are linked to Boost.Test dynamically. </p> <p> The problem is that after the tests are run and our dlls are unloaded Boost.Test fails to deinitialize as it still refers to resources in the unloaded modules. For example, it doesn't automatically unregister test cases and exception translators which refer to code in the unloaded modules. The problem with test cases and suites can be solved on our side by manually calling framework::clear before unloading any modules, but I see no such workaround for exception translators as they are registered in the unit_test_monitor_t singleton which doesn't allow to release the pointer to the translators. </p> <p> Automatic resource releasing on module unloading would be most useful in my case. Test cases and suites can be automatically unregistered by auto_test_unit_registrar destructor. Exception translators may require a bit more efforts but this is doable, too. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3527 Trac 1.4.3 Gennadiy Rozental Mon, 05 Nov 2012 09:29:55 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3527#comment:1 https://svn.boost.org/trac10/ticket/3527#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Since 62016 Execution_monitor has an ability to erase registered translators. This should be enough for you to get want you want. </p> Ticket