[zorg] r188631 - [llvmlab] Refactored some parts of Artifacts.py.
Michael Gottesman
mgottesman at apple.com
Sun Aug 18 02:14:06 PDT 2013
Author: mgottesman
Date: Sun Aug 18 04:14:05 2013
New Revision: 188631
URL: http://llvm.org/viewvc/llvm-project?rev=188631&view=rev
Log:
[llvmlab] Refactored some parts of Artifacts.py.
Modified:
zorg/trunk/zorg/buildbot/Artifacts.py
Modified: zorg/trunk/zorg/buildbot/Artifacts.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/Artifacts.py?rev=188631&r1=188630&r2=188631&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/Artifacts.py (original)
+++ zorg/trunk/zorg/buildbot/Artifacts.py Sun Aug 18 04:14:05 2013
@@ -6,17 +6,6 @@ from zorg.buildbot.PhasedBuilderUtils im
from zorg.buildbot.PhasedBuilderUtils import set_config_option
# Get some parameters about where to upload and download results from.
-# Set up defaults assuming we aren't in production mode which
-# assume that we are just using a local user.
-import getpass
-rsync_user = getpass.getuser()
-master_name = 'localhost'
-master_protocol = 'http'
-base_download_url = 'http://%s/~%s/artifacts' % (master_name, rsync_user)
-package_url = 'http://%s/~%s/packages' % (master_name, rsync_user)
-base_rsync_path = '%s@%s:~/artifacts' % (rsync_user , master_name)
-curl_flags = '-fvLo'
-
is_production = set_config_option('Master Options', 'is_production')
if is_production:
rsync_user = set_config_option('Master Options', 'rsync_user',
@@ -29,11 +18,21 @@ if is_production:
base_package_url = '%s://%s/packages' % (master_protocol, master_name)
package_url = set_config_option('Master Options', 'package_url',
base_package_url)
- base_rsync_path = set_config_option('Master Options', 'base_rsync_path',
- '%s@%s:~/artifacts' %
- (rsync_user , master_name))
+ artifacts_path = set_config_option('Master Options', 'artifacts_path',
+ '~/artifacts')
curl_flags = set_config_option('Master Options', 'curl_flags',
- '-fvLo')
+ '-fvLo')
+else:
+ import getpass
+ rsync_user = getpass.getuser()
+ master_name = 'localhost'
+ master_protocol = 'http'
+ base_download_url = 'http://%s/~%s/artifacts' % (master_name, rsync_user)
+ package_url = 'http://%s/~%s/packages' % (master_name, rsync_user)
+ artifacts_path = '~/artifacts'
+ curl_flags = '-fvLo'
+
+base_rsync_path = '%s@%s:%s' % (rsync_user, master_name, artifacts_path)
# This method is used in determining the name of a given compiler archive
def _determine_compiler_kind(props):
More information about the llvm-commits
mailing list