diff options
author | Aleksey Gurtovoy <agurtovoy@meta-comm.com> | 2005-07-19 03:16:04 +0000 |
---|---|---|
committer | Aleksey Gurtovoy <agurtovoy@meta-comm.com> | 2005-07-19 03:16:04 +0000 |
commit | d0c1a9002ca43cbf0b9600162801060dfdb71661 (patch) | |
tree | 11729d55868bb5f79041174acecd5219697acd2e /tools | |
parent | 3c9f32e002fca19f490fd39a47169cfaa285d477 (diff) | |
download | boost-d0c1a9002ca43cbf0b9600162801060dfdb71661.tar.gz |
Workaround platform.system() bug
[SVN r30172]
Diffstat (limited to 'tools')
-rw-r--r-- | tools/regression/xsl_reports/runner/regression.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/regression/xsl_reports/runner/regression.py b/tools/regression/xsl_reports/runner/regression.py index 532fd01454..6e0cc0c404 100644 --- a/tools/regression/xsl_reports/runner/regression.py +++ b/tools/regression/xsl_reports/runner/regression.py @@ -84,6 +84,14 @@ def log( message ): sys.stderr.flush() +def platform_name(): + # See http://article.gmane.org/gmane.comp.lib.boost.testing/933 + if sys.platform == 'win32': + return 'Windows' + + return platform.system() + + def rmtree( path ): if os.path.exists( path ): if sys.platform == 'win32': @@ -548,7 +556,7 @@ def collect_logs( if not os.path.exists( comment_path ): log( 'Comment file "%s" not found; creating default comment.' % comment_path ) f = open( comment_path, 'w' ) - f.write( '<p>Tests are run on %s platform.</p>' % string.capitalize( sys.platform ) ) + f.write( '<p>Tests are run on %s platform.</p>' % platform_name() ) f.close() run_type = '' @@ -750,7 +758,7 @@ def accept_args( args ): options = { '--tag' : 'CVS-HEAD' , '--local' : None - , '--platform' : platform.system() + , '--platform' : platform_name() , '--user' : None , '--comment' : None , '--toolsets' : None |