Просмотр исходного кода

Fix 'Page not found' issue for runner IDs with spaces

[SVN r37611]
Aleksey Gurtovoy 19 лет назад
Родитель
Сommit
a4f7729da9

+ 13 - 12
tools/regression/xsl_reports/boost_wide_report.py

@@ -1,5 +1,5 @@
 
-# Copyright (c) MetaCommunications, Inc. 2003-2005
+# Copyright (c) MetaCommunications, Inc. 2003-2007
 #
 # Distributed under the Boost Software License, Version 1.0. 
 # (See accompanying file LICENSE_1_0.txt or copy at 
@@ -666,18 +666,19 @@ def make_result_pages(
 def fix_file_names( dir ):
     """
     The current version of xslproc doesn't correctly handle
-    spaces on posix systems. We have to manually go through the
-    result set and correct decode encoded spaces (%20).
+    spaces. We have to manually go through the
+    result set and decode encoded spaces (%20).
     """
-    if os.name == 'posix':
-        for root, dirs, files in os.walk( dir ):
-            for file in files:
-                if file.find( "%20" ) > -1:
-                    new_name = file.replace( "%20", " " )
-                    old_file_path = os.path.join( root, file )
-                    new_file_path = os.path.join( root, new_name )
-                    print "renaming %s %s" % ( old_file_path, new_file_path )
-                    os.rename ( old_file_path, new_file_path )
+    utils.log( 'Fixing encoded file names...' )
+    for root, dirs, files in os.walk( dir ):
+        for file in files:
+            if file.find( "%20" ) > -1:
+                new_name = file.replace( "%20", " " )
+                old_file_path = os.path.join( root, file )
+                new_file_path = os.path.join( root, new_name )
+                utils.log( 'Renaming %s to %s' % ( old_file_path, new_file_path ) )
+                os.rename ( old_file_path, new_file_path )
+
 
 def build_xsl_reports( 
           locate_root_dir

+ 2 - 2
tools/regression/xsl_reports/test/generate_test_results.py

@@ -51,7 +51,7 @@ def make_test_results():
         os.makedirs( results_directory )
 
     for i_runner in range( 0, num_of_runners ):
-        runner_id = "runner_%02d" % i_runner
+        runner_id = "runner %02d" % i_runner
         g = xml.sax.saxutils.XMLGenerator( open( os.path.join( results_directory, runner_id + ".xml" ), "w" ) )
         if i_runner % 2:
             platform = "Win32"
@@ -92,7 +92,7 @@ def make_test_results():
                 continue 
                 
             for i_toolset in range( num_of_toolsets ):
-                toolset_name = "toolset_%02d" % ( i_toolset )
+                toolset_name = "toolset %02d" % ( i_toolset )
 
                 if num_of_runners - 1 == i_runner and i_toolset % 2:
                     continue

粤ICP备19079148号