Subject: [boost] [boost.test] Customized test suite gives SIGSEGV when setup fails
From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2008-09-12 10:29:40
I'm getting a SIGSEGV when trying the following with Boost 1.35.0 and gcc
using namespace boost::unit_test;
struct my_test_suite : public test_suite
test_suite *test = BOOST_TEST_SUITE("");
When run in the gdb, I get the following output:
Starting program: a.out
Test setup error: std::runtime_error: runtime_error
Program received signal SIGSEGV, Segmentation fault.
0x0806e2fa in ~framework_impl (this=0x8089740)
126 delete (test_suite const*)tu.second;
The code in question has been ported from an old Boost.Test version to 1.35.
When looking at the documentation for Boost.Test (1.36, as this seems more
in sync with Boost.Test 1.35) I'm unsure that custom test suites are still
supported in this way.
What I need to do is to set up and tear down a database connection at the
start/end of a test suite execution. Is there some other way for this?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk