From: Brian Aker Date: Sat, 1 Feb 2014 09:36:40 +0000 (+0100) Subject: Fix how Jenkins is now handling JUNIT XML. X-Git-Tag: 1.0.18~12^2~3 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=bf2a0c2d70c613ab933de37b8aaa0702a15e2ccd;p=awesomized%2Flibmemcached Fix how Jenkins is now handling JUNIT XML. --- diff --git a/libtest/formatter.cc b/libtest/formatter.cc index ad5b1635..198b9e7d 100644 --- a/libtest/formatter.cc +++ b/libtest/formatter.cc @@ -206,8 +206,10 @@ void Formatter::xml(libtest::Framework& framework_, std::ofstream& output) { output << "\t" - << std::endl; +#if 0 + << " classname=\"\" package=\"\"" +#endif + << ">" << std::endl; for (TestCases::iterator case_iter= (*framework_iter)->formatter()->testcases().begin(); case_iter != (*framework_iter)->formatter()->testcases().end(); @@ -217,23 +219,27 @@ void Formatter::xml(libtest::Framework& framework_, std::ofstream& output) << escape4XML((*case_iter)->name(), escaped_string) << " time=\"" << (*case_iter)->timer().elapsed_milliseconds() - << "\">" + << "\"" << std::endl; switch ((*case_iter)->result()) { case TEST_SKIPPED: + output << ">" << std::endl; output << "\t\t " << std::endl; + output << "\t\t" << std::endl; break; case TEST_FAILURE: + output << ">" << std::endl; output << "\t\t "<< std::endl; + output << "\t\t" << std::endl; break; case TEST_SUCCESS: + output << "/>" << std::endl; break; } - output << "\t\t" << std::endl; } output << "\t" << std::endl; }