From: prascle Date: Sat, 15 Oct 2005 10:25:37 +0000 (+0000) Subject: PR: test result summary in a file X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7288c74d3bde91dd08949d4f15e3b92de2056292;p=modules%2Fkernel.git PR: test result summary in a file --- diff --git a/src/Basics/Test/BasicMainTest.hxx b/src/Basics/Test/BasicMainTest.hxx index ace8349ed..54b2db9ee 100644 --- a/src/Basics/Test/BasicMainTest.hxx +++ b/src/Basics/Test/BasicMainTest.hxx @@ -10,6 +10,9 @@ #include #include +#include +#include + // ============================================================================ /*! * Main program source for Unit Tests with cppunit package does not depend @@ -47,12 +50,16 @@ int main(int argc, char* argv[]) // --- Print test in a compiler compatible format. - CPPUNIT_NS::CompilerOutputter outputter( &result, std::cerr ); + std::ofstream testFile; + testFile.open("UnitTestsResult", std::ios::out | std::ios::trunc); + //CPPUNIT_NS::CompilerOutputter outputter( &result, std::cerr ); + CPPUNIT_NS::CompilerOutputter outputter( &result, testFile ); outputter.write(); // --- Run the tests. bool wasSucessful = result.wasSuccessful(); + testFile.close(); // --- Return error code 1 if the one of test failed.