[Boost-bugs] [Boost C++ Libraries] #13398: Log format JUNIT generates invalid XML files

Subject: [Boost-bugs] [Boost C++ Libraries] #13398: Log format JUNIT generates invalid XML files
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-01-15 14:18:36


#13398: Log format JUNIT generates invalid XML files
------------------------------+-------------------------------
 Reporter: gallien@… | Owner: Gennadiy Rozental
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: test
  Version: Boost 1.66.0 | Severity: Problem
 Keywords: |
------------------------------+-------------------------------
 The generated XML attributes 'property' are not closed in JUNIT log output
 (see
 http://www.boost.org/doc/libs/1_66_0/libs/test/doc/html/boost_test/test_output/log_formats.html).

 Example output with log format JUNIT:

 {{{
 <?xml version="1.0" encoding="UTF-8"?>
 <testsuite tests="0" skipped="0" errors="1" failures="2" id="0"
 name="Master_Test_Suite" time="44.222">
 <properties>
 <property name="platform" value="Win32"
 <property name="compiler" value="Microsoft Visual C++ version 12.0"
 <property name="stl" value="Dinkumware standard library version 610"
 <property name="boost" value="1.66.0"
 </properties>
 }}}

 Look at 'bool test_suite_start( test_suite const& ts )' in
 'boost/test/impl/junit_log_formatter.ipp'. There are no closing tags.

 {{{
 if(m_display_build_info)
             {
                 m_stream << "<properties>" << std::endl;
                 m_stream << "<property name=\"platform\" value" <<
 utils::attr_value() << BOOST_PLATFORM << std::endl;
                 m_stream << "<property name=\"compiler\" value" <<
 utils::attr_value() << BOOST_COMPILER << std::endl;
                 m_stream << "<property name=\"stl\" value" <<
 utils::attr_value() << BOOST_STDLIB << std::endl;

                 std::ostringstream o;
                 o << BOOST_VERSION/100000 << "." << BOOST_VERSION/100 %
 1000 << "." << BOOST_VERSION % 100;
                 m_stream << "<property name=\"boost\" value" <<
 utils::attr_value() << o.str() << std::endl;
                 m_stream << "</properties>" << std::endl;
             }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13398>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2018-01-15 14:24:12 UTC