Boost logo

Boost :

From: Phil Richards (news_at_[hidden])
Date: 2005-06-17 08:58:16


On 2005-06-17, Phil Richards <news_at_[hidden]> wrote:
> On 2005-06-17, Phil Richards <news_at_[hidden]> wrote:
> > Thought I would try and track down the reason for the "Fail" being
> > shown in the HTML regression report generated by compiler_status.
> [...]
> > The "pass" assignment should take account of the "test-type".
> > (I can put a patch together, but I might not cover all the cases
> > since I don't know the system too well yet.)
> Not the most error-checked code in the world (should test_type
> be validated?), but here's a patch that gets rid of a lot of
> "Fail"s that weren't really fails:
[...]

As I said, not particularly checked, and as it turned out, wrong.
This version does seem to work a lot better.

Index: tools/regression/compiler_status.cpp
===================================================================
RCS file: /cvsroot/boost/boost/tools/regression/compiler_status.cpp,v
retrieving revision 1.37
diff -u -r1.37 compiler_status.cpp
--- tools/regression/compiler_status.cpp 1 Jun 2005 14:12:47 -0000 1.37
+++ tools/regression/compiler_status.cpp 17 Jun 2005 13:52:47 -0000
@@ -530,6 +530,7 @@

   bool do_cell( const string & lib_name,
     const fs::path & test_dir,
+ const string & test_type,
     const string & test_name,
     const string & toolset,
     string & target,
@@ -563,14 +564,23 @@
     xml::element_ptr dbp = xml::parse( file, pth.string() );
     const xml::element & db( *dbp );

- const xml::element & run_element( find_element( db, "run" ) );
+ std::string test_type_base( test_type );
+ if ( test_type_base.size() > 5 )
+ {
+ const string::size_type trailer = test_type_base.size() - 5;
+ if ( test_type_base.substr( trailer ) == "_fail" )
+ {
+ test_type_base.erase( trailer );
+ }
+ }
+ const xml::element & test_type_element( find_element( db, test_type_base ) );

- pass = !run_element.name.empty()
- && attribute_value( run_element, "result" ) != "fail";
+ pass = !test_type_element.name.empty()
+ && attribute_value( test_type_element, "result" ) != "fail";

     if ( !no_links )
     {
- note = attribute_value( find_element( db, "run" ), "result" ) == "note";
+ note = attribute_value( test_type_element, "result" ) == "note";

       // generate bookmarked report of results, and link to it
       anything_generated
@@ -649,7 +659,7 @@
     for ( std::vector<string>::const_iterator itr=toolsets.begin();
       itr != toolsets.end(); ++itr )
     {
- anything_to_report |= do_cell( lib_name, test_dir, test_name, *itr, target,
+ anything_to_report |= do_cell( lib_name, test_dir, test_type, test_name, *itr, target,
         always_show_run_output );
     }

phil

-- 
change name before "@" to "phil" for email

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk