From 7a95bc189d322c66b8d855ac0485bc7e8011352d Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 29 Sep 2003 15:19:56 +0000 Subject: [PATCH] Add support for V2 testing system, by checking for more paths and recognizing more actions. [SVN r20206] --- tools/regression/compiler_status.cpp | 22 ++++++++++++++++++---- tools/regression/process_jam_log.cpp | 11 ++++++++--- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/tools/regression/compiler_status.cpp b/tools/regression/compiler_status.cpp index b413a8986e..6439af680b 100644 --- a/tools/regression/compiler_status.cpp +++ b/tools/regression/compiler_status.cpp @@ -608,15 +608,21 @@ const string & attribute_value( const xml::element & element, while( std::getline( jamfile, line ) ) { string::size_type pos( line.find( "subinclude" ) ); + if ( pos == string::npos ) + pos = line.find( "build-project" ); if ( pos != string::npos && line.find( '#' ) > pos ) { - pos = line.find_first_not_of( " \t", pos+10 ); + pos = line.find_first_not_of( " \t./", pos+10 ); if ( pos == string::npos ) continue; string subinclude_bin_dir( line.substr( pos, line.find_first_of( " \t", pos )-pos ) ); // std::cout << "subinclude: " << subinclude_bin_dir << '\n'; fs::path subinclude_path( locate_root / "bin/boost" / subinclude_bin_dir ); + if ( fs::exists( subinclude_path ) ) + { do_rows_for_sub_tree( subinclude_path, results ); continue; } + subinclude_path = fs::path( locate_root / "bin" + / subinclude_bin_dir / "bin" ); if ( fs::exists( subinclude_path ) ) { do_rows_for_sub_tree( subinclude_path, results ); continue; } subinclude_path = fs::path( locate_root / subinclude_bin_dir / "/bin" ); @@ -637,12 +643,20 @@ const string & attribute_value( const xml::element & element, void do_table() { + // Find test result locations, trying: + // - Boost.Build V1 location with ALL_LOCATE_TARGET + // - Boost.Build V2 location with top-lelve "build-dir" + // - Boost.Build V1 location without ALL_LOCATE_TARGET fs::path bin_path( locate_root / "bin/boost/status" ); if (!fs::exists(bin_path)) { - string relative( fs::initial_path().string() ); - relative.erase( 0, boost_root.string().size()+1 ); - bin_path = fs::path( locate_root / relative / "bin" ); + bin_path = locate_root / "bin/status/bin"; + if (!fs::exists(bin_path)) + { + string relative( fs::initial_path().string() ); + relative.erase( 0, boost_root.string().size()+1 ); + bin_path = fs::path( locate_root / relative / "bin" ); + } } report << "\n"; diff --git a/tools/regression/process_jam_log.cpp b/tools/regression/process_jam_log.cpp index 829c7d25b9..0d56feb4b5 100644 --- a/tools/regression/process_jam_log.cpp +++ b/tools/regression/process_jam_log.cpp @@ -460,10 +460,14 @@ int cpp_main( int argc, char ** argv ) || line.find( "Cc-action " ) != string::npos || line.find( "vc-Cc " ) != string::npos || line.find( "Link-action " ) != string::npos - || line.find( "vc-Link " ) != string::npos ) + || line.find( "vc-Link " ) != string::npos + || line.find( ".compile.") != string::npos + || line.find( ".link") != string::npos + ) { string action( ( line.find( "Link-action " ) != string::npos - || line.find( "vc-Link " ) != string::npos ) + || line.find( "vc-Link " ) != string::npos + || line.find( ".link") != string::npos) ? "link" : "compile" ); if ( line.find( "...failed " ) != string::npos ) mgr.stop_message( action, target_directory( line ), @@ -487,7 +491,8 @@ int cpp_main( int argc, char ** argv ) capture_lines = false; } - else if ( line.find( "execute-test" ) != string::npos ) + else if ( line.find( "execute-test" ) != string::npos + || line.find( "testing.capture-output" ) != string::npos ) { if ( line.find( "...failed " ) != string::npos ) {