This adds SubunitTestProgressListener, which allows outputting test
progress via subunit (https://launchpad.net/subunit). Iwrote this ages ago
and just realised I hadn't submitted it upstream.
---
To use the patch, apply it and rebuild your cppunit. Then in your main do
{
// Create the event manager and test controller
CPPUNIT_NS::TestResult controller;
// Add a listener that collects test result
// so we can get the overall status.
// note this isn't needed for subunit...
CPPUNIT_NS::TestResultCollector result;
controller.addListener( &result );
// Add a listener that prints test activity in subunit format.
CPPUNIT_NS::SubunitTestProgressListener progress;
controller.addListener( &progress );
// Add the top suite to the test runner
CPPUNIT_NS::TestRunner runner;
runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest()
);
runner.run( controller );
return result.wasSuccessful() ? 0 : 1;
}
---
Nobody/Anonymous
test output
None
Public
|
Date: 2009-08-13 07:45 Duplicate with 1471357 which I did in fact file. I just couldn't easily |
| Filename | Description | Download |
|---|---|---|
| cppunit-subunit-1.10.2.patch | SubunitTestProgressListener - subunit support | Download |
| Field | Old Value | Date | By |
|---|---|---|---|
| close_date | - | 2009-08-13 07:51 | rbcollins |
| allow_comments | 1 | 2009-08-13 07:51 | rbcollins |
| status_id | Open | 2009-08-13 07:51 | rbcollins |
| resolution_id | None | 2009-08-13 07:45 | rbcollins |
| File Added | 338995: cppunit-subunit-1.10.2.patch | 2009-08-13 07:41 | rbcollins |