Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 18508 invoked from network); 20 Apr 2009 14:24:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 Apr 2009 14:24:30 -0000 Received: (qmail 76391 invoked by uid 500); 20 Apr 2009 14:24:30 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 76353 invoked by uid 500); 20 Apr 2009 14:24:30 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 76344 invoked by uid 99); 20 Apr 2009 14:24:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Apr 2009 14:24:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Apr 2009 14:24:29 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 311BD23888EB; Mon, 20 Apr 2009 14:24:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r766705 - /activemq/activemq-cpp/trunk/activemq-cpp/src/test/main.cpp Date: Mon, 20 Apr 2009 14:24:08 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090420142409.311BD23888EB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tabish Date: Mon Apr 20 14:24:08 2009 New Revision: 766705 URL: http://svn.apache.org/viewvc?rev=766705&view=rev Log: Test now outputs its results to an XML file as well as to the console. Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/main.cpp Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/main.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/main.cpp?rev=766705&r1=766704&r2=766705&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/main.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/main.cpp Mon Apr 20 14:24:08 2009 @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -41,6 +42,9 @@ } for( int i = 0; i < iterations; ++i ) { + + std::ofstream outputFile( "activemq-test.xml" ); + CppUnit::TextUi::TestRunner runner; CppUnit::TestFactoryRegistry ®istry = CppUnit::TestFactoryRegistry::getRegistry(); runner.addTest( registry.makeTest() ); @@ -49,7 +53,13 @@ CppUnit::BriefTestProgressListener listener; runner.eventManager().addListener( &listener ); + // Specify XML output and inform the test runner of this format. The TestRunner + // will delete the passed XmlOutputter for us. + runner.setOutputter( new CppUnit::XmlOutputter( &runner.result(), outputFile ) ); + wasSuccessful = runner.run( "", false ); + + outputFile.close(); } activemq::library::ActiveMQCPP::shutdownLibrary();