[Boost-bugs] [Boost C++ Libraries] #3527: Make Boost.Test more dll/so-friendly

Subject: [Boost-bugs] [Boost C++ Libraries] #3527: Make Boost.Test more dll/so-friendly
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-10-16 08:12:55


#3527: Make Boost.Test more dll/so-friendly
------------------------------+---------------------------------------------
 Reporter: andysem | Owner: rogeeff
     Type: Feature Requests | Status: new
Milestone: Boost 1.41.0 | Component: test
  Version: Boost 1.40.0 | Severity: Problem
 Keywords: test dll so |
------------------------------+---------------------------------------------
 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.

 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.

 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.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3527>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC