Index: process_jam_log.cpp =================================================================== RCS file: /cvsroot/boost/boost/tools/regression/process_jam_log.cpp,v retrieving revision 1.25 diff -u -r1.25 process_jam_log.cpp --- process_jam_log.cpp 28 Jun 2004 03:04:21 -0000 1.25 +++ process_jam_log.cpp 10 Jul 2004 09:06:42 -0000 @@ -125,6 +125,18 @@ ? pos : s.find( "/", pos )) - pos_start ); } + string get_bad_library_name( const string & s) + { + string library_name; + string::size_type pos = s.find( "/libs/" ); + if ( pos != string::npos ) + { + pos += 6; + library_name = s.substr( pos, s.find( "/", pos ) - pos ); + } + return library_name; + } + string test_path_to_library_name( string const& path ) { std::string result; @@ -230,22 +242,13 @@ } } - string library_name; // see "sublibs" comment below - string::size_type pos = target_directory.find( "/libs/" ); - if ( pos != string::npos ) - { - pos += 6; - library_name - = target_directory.substr( pos, - target_directory.find( "/", pos ) - pos ); - } - test_info info; - test2info_map::iterator itr( test2info.find( library_name + "/" + test_name ) ); + test2info_map::iterator itr( test2info.find( get_bad_library_name( target_directory ) + '/' + test_name ) ); if ( itr != test2info.end() ) info = itr->second; - if ( library_name.empty() ) + string library_name; + if ( !info.file_path.empty() ) library_name = test_path_to_library_name( info.file_path ); if ( info.type.empty() ) @@ -511,9 +514,7 @@ line.find( "\"", pos+3 )-pos-3 ); convert_path_separators( info.file_path ); if ( info.file_path.find( "libs/libs/" ) == 0 ) info.file_path.erase( 0, 5 ); - if ( test_name.find( "/" ) == string::npos ) - test_name = "/" + test_name; - test2info.insert( std::make_pair( test_name, info ) ); + test2info.insert( std::make_pair( get_bad_library_name( info.file_path ) + '/' + test_name, info ) ); // std::cout << test_name << ", " << info.type << ", " << info.file_path << "\n"; } else