|
Boost-Commit : |
From: grafikrobot_at_[hidden]
Date: 2007-12-04 19:32:04
Author: grafik
Date: 2007-12-04 19:32:04 EST (Tue, 04 Dec 2007)
New Revision: 41727
URL: http://svn.boost.org/trac/boost/changeset/41727
Log:
Switch FTP site for results.
Text files modified:
trunk/tools/regression/src/collect_and_upload_logs.py | 38 ++++++++++++++++++++++++++++----------
trunk/tools/regression/src/regression.py | 39 ++++++++++++++++++++++++++++-----------
trunk/tools/regression/xsl_reports/boost_wide_report.py | 4 ++--
3 files changed, 58 insertions(+), 23 deletions(-)
Modified: trunk/tools/regression/src/collect_and_upload_logs.py
==============================================================================
--- trunk/tools/regression/src/collect_and_upload_logs.py (original)
+++ trunk/tools/regression/src/collect_and_upload_logs.py 2007-12-04 19:32:04 EST (Tue, 04 Dec 2007)
@@ -17,6 +17,8 @@
import os.path
import string
import sys
+import re
+import urlparse
def process_xml_file( input_file, output_file ):
@@ -176,23 +178,32 @@
utils.log('Dart server error: %s' % e)
-def upload_to_ftp( tag, results_file, ftp_proxy, debug_level ):
- ftp_site = 'fx.meta-comm.com'
- site_path = '/boost-regression'
- utils.log( 'Uploading log archive "%s" to ftp://%s%s/%s' % ( results_file, ftp_site, site_path, tag ) )
+def upload_to_ftp( tag, results_file, ftp_proxy, debug_level, ftp_url ):
+
+ if not ftp_url:
+ ftp_host = 'boost.cowic.de'
+ ftp_url = ''.join(['ftp','://anonymous','@',ftp_host,'/boost/test/results/'])
+ utils.log( 'Uploading log archive "%s" to %s/%s' % ( results_file, ftp_url, tag ) )
+
+ ftp_parts = urlparse.urlparse(ftp_url)
+ ftp_netloc = re.split('[@]',ftp_parts[1])
+ ftp_user = re.split('[:]',ftp_netloc[0])[0]
+ ftp_password = re.split('[:]',ftp_netloc[0]+':anonymous')[1]
+ ftp_site = re.split('[:]',ftp_netloc[1])[0]
+ ftp_path = ftp_parts[2]
if not ftp_proxy:
ftp = ftplib.FTP( ftp_site )
ftp.set_debuglevel( debug_level )
- ftp.login()
+ ftp.login( ftp_user, ftp_password )
else:
utils.log( ' Connecting through FTP proxy server "%s"' % ftp_proxy )
ftp = ftplib.FTP( ftp_proxy )
ftp.set_debuglevel( debug_level )
ftp.set_pasv (0) # turn off PASV mode
- ftp.login( 'anonymous@%s' % ftp_site, 'anonymous@' )
+ ftp.login( '%s@%s' % (ftp_user,ftp_site), ftp_password )
- ftp.cwd( site_path )
+ ftp.cwd( ftp_path )
try:
ftp.cwd( tag )
except ftplib.error_perm:
@@ -323,11 +334,12 @@
, send_bjam_log = False
, timestamp_file = None
, dart_server = None
+ , ftp_url = None
, **unused
):
logs_archive = os.path.join( results_dir, '%s.zip' % runner_id )
- upload_to_ftp( tag, logs_archive, ftp_proxy, debug_level )
+ upload_to_ftp( tag, logs_archive, ftp_proxy, debug_level, ftp_url )
if send_bjam_log:
bjam_log_path = os.path.join( results_dir, 'bjam.log' )
if not timestamp_file:
@@ -336,7 +348,7 @@
timestamp = time.strftime( '%Y-%m-%d-%H-%M-%S', read_timestamp( timestamp_file ) )
logs_archive = os.path.join( results_dir, '%s.%s.log.zip' % ( runner_id, timestamp ) )
compress_file( bjam_log_path, logs_archive )
- upload_to_ftp( '%s/logs' % tag, logs_archive, ftp_proxy, debug_level )
+ upload_to_ftp( '%s/logs' % tag, logs_archive, ftp_proxy, debug_level, ftp_url )
def collect_and_upload_logs(
@@ -355,6 +367,7 @@
, send_bjam_log = False
, dart_server = None
, http_proxy = None
+ , ftp_url = None
, **unused
):
@@ -383,6 +396,7 @@
, send_bjam_log
, timestamp_file
, dart_server = dart_server
+ , ftp_url = ftp_url
)
@@ -404,6 +418,7 @@
, 'help'
, 'dart-server='
, 'revision='
+ , 'ftp='
]
options = {
@@ -419,6 +434,7 @@
, '--debug-level' : 0
, '--dart-server' : 'beta.boost.org:8081'
, '--revision' : None
+ , '--ftp' : None
}
@@ -439,7 +455,8 @@
, 'debug_level' : int(options[ '--debug-level' ])
, 'send_bjam_log' : options.has_key( '--send-bjam-log' )
, 'dart_server' : options[ '--dart-server' ]
- , 'revision ' : options[ '--revision' ]
+ , 'revision' : options[ '--revision' ]
+ , 'ftp' : options[ '--ftp' ]
}
@@ -475,6 +492,7 @@
\t--debug-level debugging level; controls the amount of debugging
\t output printed; 0 by default (no debug output)
\t--dart-server The dart server to send results to.
+\t--ftp The ftp URL to upload results to.
''' % '\n\t'.join( commands.keys() )
Modified: trunk/tools/regression/src/regression.py
==============================================================================
--- trunk/tools/regression/src/regression.py (original)
+++ trunk/tools/regression/src/regression.py 2007-12-04 19:32:04 EST (Tue, 04 Dec 2007)
@@ -84,6 +84,8 @@
action='store_true' )
#~ Connection Options:
+ opt.add_option( '--ftp',
+ help="FTP URL to upload results to." )
opt.add_option( '--proxy',
help="HTTP proxy server address and port (e.g.'http://www.someproxy.com:3128')" )
opt.add_option( '--ftp-proxy',
@@ -121,6 +123,7 @@
self.local=None
self.force_update=False
self.have_source=False
+ self.ftp=None
self.proxy=None
self.ftp_proxy=None
self.dart_server=None
@@ -386,17 +389,31 @@
def command_upload_logs(self):
self.import_utils()
from collect_and_upload_logs import upload_logs
- self.retry(
- lambda:
- upload_logs(
- self.regression_results,
- self.runner, self.tag,
- self.user,
- self.ftp_proxy,
- self.debug_level, self.send_bjam_log,
- self.timestamp_path,
- self.dart_server )
- )
+ if self.ftp:
+ self.retry(
+ lambda:
+ upload_logs(
+ self.regression_results,
+ self.runner, self.tag,
+ self.user,
+ self.ftp_proxy,
+ self.debug_level, self.send_bjam_log,
+ self.timestamp_path,
+ self.dart_server,
+ ftp_url = self.ftp )
+ )
+ else:
+ self.retry(
+ lambda:
+ upload_logs(
+ self.regression_results,
+ self.runner, self.tag,
+ self.user,
+ self.ftp_proxy,
+ self.debug_level, self.send_bjam_log,
+ self.timestamp_path,
+ self.dart_server )
+ )
def command_regression(self):
import socket
Modified: trunk/tools/regression/xsl_reports/boost_wide_report.py
==============================================================================
--- trunk/tools/regression/xsl_reports/boost_wide_report.py (original)
+++ trunk/tools/regression/xsl_reports/boost_wide_report.py 2007-12-04 19:32:04 EST (Tue, 04 Dec 2007)
@@ -484,8 +484,8 @@
os.makedirs( merged_dir )
if not dont_collect_logs:
- ftp_site = 'fx.meta-comm.com'
- site_path = '/boost-regression/%s' % tag
+ ftp_site = 'boost.cowic.de'
+ site_path = '/boost/test/results/%s' % tag
ftp_task( ftp_site, site_path, incoming_dir )
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk