Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: infra/scripts/legacy/site_config/config_bootstrap.py

Issue 1213433006: Fork runtest.py and everything it needs src-side for easier hacking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: runisolatedtest.py Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 """
6 Site configuration information that is sufficient to configure a slave,
7 without loading any buildbot or twisted code.
8 """
9
10 import inspect
11 import os
12
13 BASE_DIR = os.path.dirname(os.path.abspath(__file__))
14
15 # Override config_default with a config_private file.
16 BASE_MASTERS = []
17 try:
18 import config_private # pylint: disable=F0401
19 BASE_MASTERS += [config_private.Master, config_private.PublicMaster]
20 except ImportError:
21 import config_default as config_private # pylint: disable=W0403
22 BASE_MASTERS += [config_private.Master,]
23
24
25 class Master(config_private.Master):
26 """Buildbot master configuration options."""
27
28 trunk_url = (config_private.Master.server_url +
29 config_private.Master.repo_root + '/trunk')
30
31 webkit_trunk_url = (config_private.Master.webkit_root_url + '/trunk')
32
33 trunk_url_src = config_private.Master.git_server_url + '/chromium/src.git'
34 trunk_url_tools = trunk_url + '/tools'
35 nacl_url = config_private.Master.nacl_trunk_url + '/src/native_client'
36 nacl_sdk_root_url = 'https://nativeclient-sdk.googlecode.com/svn'
37 nacl_ports_trunk_url = 'https://naclports.googlecode.com/svn/trunk'
38 nacl_ports_url = nacl_ports_trunk_url + '/src'
39 gears_url = 'http://gears.googlecode.com/svn/trunk'
40 gyp_trunk_url = 'http://gyp.googlecode.com/svn/trunk'
41 branch_url = (config_private.Master.server_url +
42 config_private.Master.repo_root + '/branches')
43 merge_branch_url = branch_url + '/chrome_webkit_merge_branch'
44 merge_branch_url_src = merge_branch_url + '/src'
45
46 v8_url = 'http://v8.googlecode.com/svn'
47 v8_branch_url = (v8_url + '/branches')
48 v8_bleeding_edge = v8_branch_url + '/bleeding_edge'
49 v8_trunk = v8_url + '/trunk'
50 es5conform_root_url = "https://es5conform.svn.codeplex.com/svn/"
51 es5conform_revision = 62998
52
53 dart_url = config_private.Master.googlecode_url % 'dart'
54 dart_bleeding = dart_url + '/branches/bleeding_edge'
55 dart_trunk = dart_url + '/trunk'
56
57 oilpan_url = (config_private.Master.webkit_root_url + '/branches/oilpan')
58
59 skia_url = 'http://skia.googlecode.com/svn/'
60
61 syzygy_url = 'http://sawbuck.googlecode.com/svn/'
62
63 webrtc_url = config_private.Master.googlecode_url % 'webrtc'
64 libyuv_url = 'http://libyuv.googlecode.com/svn'
65
66 # Default target platform if none was given to the factory.
67 default_platform = 'win32'
68
69 # Used by the waterfall display.
70 project_url = 'http://www.chromium.org'
71
72 # Base URL for perf test results.
73 perf_base_url = 'http://build.chromium.org/f/chromium/perf'
74
75 # Suffix for perf URL.
76 perf_report_url_suffix = 'report.html?history=150'
77
78 # Directory in which to save perf-test output data files.
79 perf_output_dir = '~/www/perf'
80
81 # URL pointing to builds and test results.
82 archive_url = 'http://build.chromium.org/buildbot'
83
84 # The test results server to upload our test results.
85 test_results_server = 'test-results.appspot.com'
86
87 # File in which to save a list of graph names.
88 perf_graph_list = 'graphs.dat'
89
90 # Magic step return code inidicating "warning(s)" rather than "error".
91 retcode_warnings = 88
92
93 @staticmethod
94 def GetBotPassword():
95 """Returns the slave password retrieved from a local file, or None.
96
97 The slave password is loaded from a local file next to this module file, if
98 it exists. This is a function rather than a variable so it's not called
99 when it's not needed.
100
101 We can't both make this a property and also keep it static unless we use a
102 <metaclass, which is overkill for this usage.
103 """
104 # Note: could be overriden by config_private.
105 if not getattr(Master, 'bot_password', None):
106 # If the bot_password has been requested, the file is required to exist
107 # if not overriden in config_private.
108 bot_password_path = os.path.join(BASE_DIR, '.bot_password')
109 Master.bot_password = open(bot_password_path).read().strip('\n\r')
110 return Master.bot_password
111
112 @staticmethod
113 def _extract_masters(master):
114 return [v for v in master.__dict__.itervalues()
115 if (inspect.isclass(v) and
116 issubclass(v, config_private.Master.Base) and
117 v != config_private.Master.Base)]
118
119 @classmethod
120 def get_base_masters(cls):
121 masters = []
122 for base_master in BASE_MASTERS:
123 masters += cls._extract_masters(base_master)
124 return masters
125
126 @classmethod
127 def get_all_masters(cls):
128 return cls._extract_masters(cls)
OLDNEW
« no previous file with comments | « infra/scripts/legacy/site_config/config.py ('k') | infra/scripts/legacy/site_config/config_default.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698