Browse Source

Modify to support the new cross-project build style. Specifically building with the new single structure at boost-root./bin/... Old, inline, style is also supported as a fallback.

[SVN r19939]
Rene Rivera 22 years ago
parent
commit
609bb1506b
2 changed files with 25 additions and 15 deletions
  1. 19 6
      tools/regression/compiler_status.cpp
  2. 6 9
      tools/regression/process_jam_log.cpp

+ 19 - 6
tools/regression/compiler_status.cpp

@@ -178,7 +178,11 @@ namespace
 
     // the gcc config_info "Detected Platform" sometimes reports "cygwin", so
     // prefer any of the other compilers.
-    if ( find_file( locate_root / "status/bin/config_info.test",
+    if ( find_file( locate_root / "bin/boost/status/config_info.test",
+      "config_info.output", dot_output_path, "gcc" )
+      || find_file( locate_root / "bin/boost/status/config_info.test",
+      "config_info.output", dot_output_path )
+      || find_file( locate_root / "status/bin/config_info.test",
       "config_info.output", dot_output_path, "gcc" )
       || find_file( locate_root / "status/bin/config_info.test",
       "config_info.output", dot_output_path ) )
@@ -207,7 +211,9 @@ namespace
   {
     string result;
     fs::path dot_output_path;
-    if ( find_file( locate_root / "status/bin/config_info.test"
+    if ( find_file( locate_root / "bin/boost/status/config_info.test"
+      / compiler_name, "config_info.output", dot_output_path )
+      || find_file( locate_root / "status/bin/config_info.test"
       / compiler_name, "config_info.output", dot_output_path ) )
     {
       fs::ifstream file( dot_output_path );
@@ -611,7 +617,10 @@ const string & attribute_value( const xml::element & element,
         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 / subinclude_bin_dir / "/bin" );
+        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 / subinclude_bin_dir / "/bin" );
         if ( fs::exists( subinclude_path ) )
           { do_rows_for_sub_tree( subinclude_path, results ); }
       }
@@ -629,9 +638,13 @@ const string & attribute_value( const xml::element & element,
 
   void do_table()
   {
-    string relative( fs::initial_path().string() );
-    relative.erase( 0, boost_root.string().size()+1 );
-    fs::path bin_path( locate_root / relative / "bin" );
+    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" );
+    }
 
     report << "<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\n";
 

+ 6 - 9
tools/regression/process_jam_log.cpp

@@ -102,11 +102,8 @@ namespace
   string toolset( const string & s )
   {
     string t( s );
-    string::size_type pos = t.find( "/bin/" );
-    if ( pos != string::npos ) pos += 5;
-    else return "";
-    pos = t.find( "/", pos );
-    if ( pos != string::npos ) pos += 1;
+    string::size_type pos = t.find( ".test/" );
+    if ( pos != string::npos ) pos += 6;
     else return "";
     return t.substr( pos, t.find( "/", pos ) - pos );
   }
@@ -114,10 +111,10 @@ namespace
   string test_name( const string & s )
   {
     string t( s );
-    string::size_type pos = t.find( "/bin/" );
-    if ( pos != string::npos ) pos += 5;
-    else return "";
-    return t.substr( pos, t.find( ".", pos ) - pos );
+    string::size_type pos = t.find( ".test/" );
+    if ( pos == string::npos ) return "";
+	string::size_type pos_start = t.rfind( '/', pos ) + 1;
+    return t.substr( pos_start, pos - pos_start );
   }
 
   // the format of paths is really kinky, so convert to normal form

粤ICP备19079148号