Fri Jun 18 16:13:56 2010 UTC ()
Handle xfail in a few more places.  Found by, la la la, the new tests.


(pooka)
diff -r1.2 -r1.3 src/external/bsd/atf/dist/atf-report/atf-report.cpp

cvs diff -r1.2 -r1.3 src/external/bsd/atf/dist/atf-report/Attic/atf-report.cpp (expand / switch to unified diff)

--- src/external/bsd/atf/dist/atf-report/Attic/atf-report.cpp 2010/06/16 15:17:37 1.2
+++ src/external/bsd/atf/dist/atf-report/Attic/atf-report.cpp 2010/06/18 16:13:56 1.3
@@ -144,26 +144,29 @@ public: @@ -144,26 +144,29 @@ public:
144 void 144 void
145 write_tc_end(const atf::tests::tcr& tcr) 145 write_tc_end(const atf::tests::tcr& tcr)
146 { 146 {
147 std::string str = "tc, "; 147 std::string str = "tc, ";
148 if (tcr.get_state() == atf::tests::tcr::passed_state) { 148 if (tcr.get_state() == atf::tests::tcr::passed_state) {
149 str += m_tpname + ", " + m_tcname + ", passed"; 149 str += m_tpname + ", " + m_tcname + ", passed";
150 } else if (tcr.get_state() == atf::tests::tcr::failed_state) { 150 } else if (tcr.get_state() == atf::tests::tcr::failed_state) {
151 str += m_tpname + ", " + m_tcname + ", failed, " + 151 str += m_tpname + ", " + m_tcname + ", failed, " +
152 tcr.get_reason(); 152 tcr.get_reason();
153 m_failed = true; 153 m_failed = true;
154 } else if (tcr.get_state() == atf::tests::tcr::skipped_state) { 154 } else if (tcr.get_state() == atf::tests::tcr::skipped_state) {
155 str += m_tpname + ", " + m_tcname + ", skipped, " + 155 str += m_tpname + ", " + m_tcname + ", skipped, " +
156 tcr.get_reason(); 156 tcr.get_reason();
 157 } else if (tcr.get_state() == atf::tests::tcr::xfail_state) {
 158 str += m_tpname + ", " + m_tcname + ", xfail, " +
 159 tcr.get_reason();
157 } else 160 } else
158 UNREACHABLE; 161 UNREACHABLE;
159 (*m_os) << str << std::endl; 162 (*m_os) << str << std::endl;
160 } 163 }
161}; 164};
162 165
163// ------------------------------------------------------------------------ 166// ------------------------------------------------------------------------
164// The "ticker_writer" class. 167// The "ticker_writer" class.
165// ------------------------------------------------------------------------ 168// ------------------------------------------------------------------------
166 169
167//! 170//!
168//! \brief A console-friendly output format. 171//! \brief A console-friendly output format.
169//! 172//!
@@ -415,26 +418,29 @@ class xml_writer : public writer { @@ -415,26 +418,29 @@ class xml_writer : public writer {
415 write_tc_end(const atf::tests::tcr& tcr) 418 write_tc_end(const atf::tests::tcr& tcr)
416 { 419 {
417 std::string str; 420 std::string str;
418 421
419 atf::tests::tcr::state s = tcr.get_state(); 422 atf::tests::tcr::state s = tcr.get_state();
420 if (s == atf::tests::tcr::passed_state) { 423 if (s == atf::tests::tcr::passed_state) {
421 (*m_os) << "<passed />" << std::endl; 424 (*m_os) << "<passed />" << std::endl;
422 } else if (s == atf::tests::tcr::failed_state) { 425 } else if (s == atf::tests::tcr::failed_state) {
423 (*m_os) << "<failed>" << elemval(tcr.get_reason()) 426 (*m_os) << "<failed>" << elemval(tcr.get_reason())
424 << "</failed>" << std::endl; 427 << "</failed>" << std::endl;
425 } else if (s == atf::tests::tcr::skipped_state) { 428 } else if (s == atf::tests::tcr::skipped_state) {
426 (*m_os) << "<skipped>" << elemval(tcr.get_reason()) 429 (*m_os) << "<skipped>" << elemval(tcr.get_reason())
427 << "</skipped>" << std::endl; 430 << "</skipped>" << std::endl;
 431 } else if (s == atf::tests::tcr::xfail_state) {
 432 (*m_os) << "<xfail>" << elemval(tcr.get_reason())
 433 << "</xfail>" << std::endl;
428 } else 434 } else
429 UNREACHABLE; 435 UNREACHABLE;
430 (*m_os) << "</tc>" << std::endl; 436 (*m_os) << "</tc>" << std::endl;
431 } 437 }
432 438
433 void 439 void
434 write_eof(void) 440 write_eof(void)
435 { 441 {
436 (*m_os) << "</tests-results>" << std::endl; 442 (*m_os) << "</tests-results>" << std::endl;
437 } 443 }
438 444
439public: 445public:
440 xml_writer(const atf::fs::path& p) : 446 xml_writer(const atf::fs::path& p) :