2 # Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
11 python = sys.executable
17 ######################################################################
19 ######################################################################
21 python + ' buildbot\\buildbot_standard.py opt 32 newlib --no-gyp',
23 python + ' buildbot\\buildbot_standard.py opt 32 glibc --no-gyp',
26 python + ' buildbot\\buildbot_standard.py opt 32 newlib --no-gyp',
28 python + ' buildbot\\buildbot_standard.py opt 32 glibc --no-gyp',
30 'precise-64-validator-opt':
31 python + ' buildbot/buildbot_standard.py opt 64 glibc --validator',
34 'precise_64-newlib-dbg-clang':
35 python + ' buildbot/buildbot_standard.py dbg 64 newlib --clang',
36 'mac10.7-newlib-dbg-clang':
37 python + ' buildbot/buildbot_standard.py dbg 32 newlib --clang',
40 'precise_64-newlib-dbg-asan':
41 python + ' buildbot/buildbot_standard.py opt 64 newlib --asan',
42 'mac10.7-newlib-dbg-asan':
43 python + ' buildbot/buildbot_standard.py opt 32 newlib --asan',
46 'oneiric_32-newlib-arm_hw-pnacl-panda-dbg':
47 bash + ' buildbot/buildbot_pnacl.sh mode-buildbot-arm-hw-dbg',
48 'oneiric_32-newlib-arm_hw-pnacl-panda-opt':
49 bash + ' buildbot/buildbot_pnacl.sh mode-buildbot-arm-hw-opt',
50 'precise_64-newlib-arm_qemu-pnacl-dbg':
51 bash + ' buildbot/buildbot_pnacl.sh mode-buildbot-arm-dbg',
52 'precise_64-newlib-arm_qemu-pnacl-opt':
53 bash + ' buildbot/buildbot_pnacl.sh mode-buildbot-arm-opt',
54 'precise_64-newlib-x86_32-pnacl':
55 python + ' buildbot/buildbot_pnacl.py opt 32 pnacl',
56 'precise_64-newlib-x86_64-pnacl':
57 python + ' buildbot/buildbot_pnacl.py opt 64 pnacl',
58 'precise_64-newlib-mips-pnacl':
59 echo + ' "TODO(mseaborn): add mips"',
61 'lucid_64-newlib-arm_qemu-pnacl-buildonly-spec':
62 bash + ' buildbot/buildbot_spec2k.sh pnacl-arm-buildonly',
63 'oneiric_32-newlib-arm_hw-pnacl-panda-spec':
64 bash + ' buildbot/buildbot_spec2k.sh pnacl-arm-hw',
65 'lucid_64-newlib-x86_32-pnacl-spec':
66 bash + ' buildbot/buildbot_spec2k.sh pnacl-x8632',
67 'lucid_64-newlib-x86_64-pnacl-spec':
68 bash + ' buildbot/buildbot_spec2k.sh pnacl-x8664',
69 'precise_64-newlib-arm_qemu-pnacl-buildonly-spec':
70 bash + ' buildbot/buildbot_spec2k.sh pnacl-arm-buildonly',
72 'lucid_64-newlib-x86_32-spec':
73 bash + ' buildbot/buildbot_spec2k.sh nacl-x8632',
74 'lucid_64-newlib-x86_64-spec':
75 bash + ' buildbot/buildbot_spec2k.sh nacl-x8664',
78 'precise-64-newlib-dbg-valgrind':
79 echo + ' "Valgrind bots are disabled: see '
80 'https://code.google.com/p/nativeclient/issues/detail?id=3158"',
81 'precise-64-glibc-dbg-valgrind':
82 echo + ' "Valgrind bots are disabled: see '
83 'https://code.google.com/p/nativeclient/issues/detail?id=3158"',
85 'mac10.6-newlib-coverage':
86 python + (' buildbot/buildbot_standard.py '
87 'coverage 64 newlib --coverage --clang'),
88 'precise-64-32-newlib-coverage':
89 python + (' buildbot/buildbot_standard.py '
90 'coverage 32 newlib --coverage'),
91 'precise-64-64-newlib-coverage':
92 python + (' buildbot/buildbot_standard.py '
93 'coverage 64 newlib --coverage'),
95 python + (' buildbot/buildbot_standard.py '
96 'coverage 32 newlib --coverage'),
98 ######################################################################
100 ######################################################################
101 'nacl-precise64_validator_opt':
102 python + ' buildbot/buildbot_standard.py opt 64 glibc --validator',
103 'nacl-precise64_newlib_dbg_valgrind':
104 bash + ' buildbot/buildbot_valgrind.sh newlib',
105 'nacl-precise64_glibc_dbg_valgrind':
106 bash + ' buildbot/buildbot_valgrind.sh glibc',
108 'nacl-mac10.6-newlib-coverage':
109 python + (' buildbot/buildbot_standard.py '
110 'coverage 64 newlib --coverage --clang'),
111 'nacl-precise-64-32-newlib-coverage':
112 python + (' buildbot/buildbot_standard.py '
113 'coverage 32 newlib --coverage'),
114 'nacl-precise-64-64-newlib-coverage':
115 python + (' buildbot/buildbot_standard.py '
116 'coverage 64 newlib --coverage'),
117 'nacl-win32-newlib-coverage':
118 python + (' buildbot/buildbot_standard.py '
119 'coverage 32 newlib --coverage'),
121 'nacl-precise_64-newlib-dbg-clang':
122 python + ' buildbot/buildbot_standard.py dbg 64 newlib --clang',
123 'nacl-mac10.6-newlib-dbg-clang':
124 python + ' buildbot/buildbot_standard.py dbg 32 newlib --clang',
126 'nacl-precise_64-newlib-arm_qemu-pnacl':
127 bash + ' buildbot/buildbot_pnacl.sh mode-trybot-qemu',
128 'nacl-precise_64-newlib-x86_32-pnacl':
129 python + ' buildbot/buildbot_pnacl.py opt 32 pnacl',
130 'nacl-precise_64-newlib-x86_64-pnacl':
131 python + ' buildbot/buildbot_pnacl.py opt 64 pnacl',
132 'nacl-precise_64-newlib-mips-pnacl':
133 echo + ' "TODO(mseaborn): add mips"',
134 'nacl-arm_opt_panda':
135 bash + ' buildbot/buildbot_pnacl.sh mode-buildbot-arm-try',
136 'nacl-arm_hw_opt_panda':
137 bash + ' buildbot/buildbot_pnacl.sh mode-buildbot-arm-hw-try',
138 # Pnacl spec2k trybots
139 'nacl-precise_64-newlib-x86_32-pnacl-spec':
140 bash + ' buildbot/buildbot_spec2k.sh pnacl-trybot-x8632',
141 'nacl-precise_64-newlib-x86_64-pnacl-spec':
142 bash + ' buildbot/buildbot_spec2k.sh pnacl-trybot-x8664',
143 'nacl-arm_perf_panda':
144 bash + ' buildbot/buildbot_spec2k.sh pnacl-trybot-arm-buildonly',
145 'nacl-arm_hw_perf_panda':
146 bash + ' buildbot/buildbot_spec2k.sh pnacl-trybot-arm-hw',
148 'precise64-glibc': bash + ' buildbot/buildbot_linux-glibc-makefile.sh',
149 'mac-glibc': bash + ' buildbot/buildbot_mac-glibc-makefile.sh',
150 'win7-glibc': 'buildbot\\buildbot_windows-glibc-makefile.bat',
151 # Toolchain newlib x86.
152 'win7-toolchain_x86': 'buildbot\\buildbot_toolchain_win.bat',
153 'mac-toolchain_x86': bash + ' buildbot/buildbot_toolchain.sh mac',
154 'precise64-toolchain_x86': bash + ' buildbot/buildbot_toolchain.sh linux',
155 # Toolchain newlib arm.
156 'win7-toolchain_arm':
157 python + ' buildbot/buildbot_toolchain_build.py --buildbot',
159 python + ' buildbot/buildbot_toolchain_build.py --buildbot',
160 'precise64-toolchain_arm':
161 python + ' buildbot/buildbot_toolchain_build.py --buildbot',
163 # Pnacl toolchain builders.
164 'linux-armtools-x86_32':
165 bash + ' buildbot/buildbot_toolchain_arm_trusted.sh',
166 'linux-pnacl-x86_32':
167 python + ' buildbot/buildbot_pnacl_toolchain.py --buildbot',
168 'linux-pnacl-x86_64':
169 python + ' buildbot/buildbot_pnacl_toolchain.py --buildbot',
170 'precise-pnacl-x86_32':
171 python + ' buildbot/buildbot_pnacl_toolchain.py --buildbot',
172 'precise-pnacl-x86_64':
173 python + ' buildbot/buildbot_pnacl_toolchain.py --buildbot',
175 python + ' buildbot/buildbot_pnacl_toolchain.py --buildbot',
176 # TODO(robertm): Delete this once we are using win-pnacl-x86_64
178 python + ' buildbot/buildbot_pnacl_toolchain.py --buildbot',
179 # TODO(robertm): use this in favor or the misnamed win-pnacl-x86_32
181 python + ' buildbot/buildbot_pnacl_toolchain.py --buildbot',
183 # Pnacl toolchain testers
184 'linux-pnacl-x86_64-tests-x86_64':
185 bash + ' buildbot/buildbot_pnacl_toolchain_tests.sh tc-test-bot x86-64',
186 'linux-pnacl-x86_64-tests-x86_32':
187 bash + ' buildbot/buildbot_pnacl_toolchain_tests.sh tc-test-bot x86-32',
188 'linux-pnacl-x86_64-tests-arm':
189 bash + ' buildbot/buildbot_pnacl_toolchain_tests.sh tc-test-bot arm',
191 # MIPS toolchain buildbot.
192 'linux-pnacl-x86_32-tests-mips':
193 bash + ' buildbot/buildbot_toolchain_mips_trusted.sh',
196 'nacl-toolchain-precise64-newlib':
197 bash + ' buildbot/buildbot_toolchain.sh linux',
198 'nacl-toolchain-mac-newlib': bash + ' buildbot/buildbot_toolchain.sh mac',
199 'nacl-toolchain-win7-newlib': 'buildbot\\buildbot_toolchain_win.bat',
200 'nacl-toolchain-precise64-newlib-arm':
201 python + ' buildbot/buildbot_toolchain_build.py --trybot',
202 'nacl-toolchain-mac-newlib-arm':
203 python + ' buildbot/buildbot_toolchain_build.py --trybot',
204 'nacl-toolchain-win7-newlib-arm':
205 python + ' buildbot/buildbot_toolchain_build.py --trybot',
206 'nacl-toolchain-precise64-glibc':
207 bash + ' buildbot/buildbot_linux-glibc-makefile.sh',
208 'nacl-toolchain-mac-glibc':
209 bash + ' buildbot/buildbot_mac-glibc-makefile.sh',
210 'nacl-toolchain-win7-glibc':
211 'buildbot\\buildbot_windows-glibc-makefile.bat',
213 # Pnacl toolchain trybots.
214 'nacl-toolchain-linux-pnacl-x86_32':
215 python + ' buildbot/buildbot_pnacl_toolchain.py --trybot',
216 'nacl-toolchain-linux-pnacl-x86_64':
217 python + ' buildbot/buildbot_pnacl_toolchain.py --trybot',
218 'nacl-toolchain-linux-pnacl-mips': echo + ' "TODO(mseaborn)"',
219 'nacl-toolchain-precise-pnacl-x86_32':
220 python + ' buildbot/buildbot_pnacl_toolchain.py --trybot',
221 'nacl-toolchain-precise-pnacl-x86_64':
222 python + ' buildbot/buildbot_pnacl_toolchain.py --trybot',
223 'nacl-toolchain-precise-pnacl-mips': echo + ' "TODO(mseaborn)"',
224 'nacl-toolchain-mac-pnacl-x86_32':
225 python + ' buildbot/buildbot_pnacl_toolchain.py --trybot',
226 'nacl-toolchain-win7-pnacl-x86_64':
227 python + ' buildbot/buildbot_pnacl_toolchain.py --trybot',
240 'vista', 'win7', 'win8', 'win',
241 'mac10.6', 'mac10.7', 'mac10.8',
242 'lucid', 'precise'] + special_for_arm:
243 if platform in special_for_arm:
244 arch_variants = ['arm']
246 arch_variants = ['', '32', '64', 'arm']
247 for arch in arch_variants:
250 arch_part = '-' + arch
251 # Disable GYP build for win32 bots and arm cross-builders. In this case
252 # "win" means Windows XP, not Vista, Windows 7, etc.
254 # Building via GYP always builds all toolchains by default, but the win32
255 # XP pnacl builds are pathologically slow (e.g. ~38 seconds per compile on
256 # the nacl-win32_glibc_opt trybot). There are other builders that test
257 # Windows builds via gyp, so the reduced test coverage should be slight.
258 if arch == 'arm' or (platform == 'win' and arch == '32'):
259 arch_flags += ' --no-gyp'
263 if platform.startswith('mac'):
264 arch_flags += ' --clang'
265 # Test with Breakpad tools only on basic Linux builds.
266 if sys.platform.startswith('linux'):
267 arch_flags += ' --use-breakpad-tools'
268 for mode in ['dbg', 'opt']:
269 for libc in ['newlib', 'glibc']:
271 for bare in ['', '-bare']:
272 name = platform + arch_part + bare + '-' + libc + '-' + mode
273 assert name not in BOT_ASSIGNMENT, name
274 BOT_ASSIGNMENT[name] = (
275 python + ' buildbot/buildbot_standard.py ' +
276 mode + ' ' + real_arch + ' ' + libc + arch_flags)
278 for arch_sep in ['', '-', '_']:
279 name = 'nacl-' + platform + arch_sep + arch + '_' + libc + '_' + mode
280 assert name not in BOT_ASSIGNMENT, name
281 BOT_ASSIGNMENT[name] = (
282 python + ' buildbot/buildbot_standard.py ' +
283 mode + ' ' + real_arch + ' ' + libc + arch_flags)
286 def EscapeJson(data):
287 return '"' + json.dumps(data).replace('"', r'\"') + '"'
291 builder = os.environ.get('BUILDBOT_BUILDERNAME')
292 build_number = os.environ.get('BUILDBOT_BUILDNUMBER')
293 slave_type = os.environ.get('BUILDBOT_SLAVE_TYPE')
294 cmd = BOT_ASSIGNMENT.get(builder)
296 sys.stderr.write('ERROR - unset/invalid builder name\n')
299 env = os.environ.copy()
301 # Use .boto file from home-dir instead of buildbot supplied one.
302 if 'AWS_CREDENTIAL_FILE' in env:
303 del env['AWS_CREDENTIAL_FILE']
304 if 'BOTO_CONFIG' in env:
305 del env['BOTO_CONFIG']
307 env['GSUTIL'] = '/b/build/third_party/gsutil/gsutil'
309 # Run through runtest.py to get upload of perf data.
311 'buildername': builder,
312 'mastername': 'client.nacl',
313 'buildnumber': str(build_number),
315 factory_properties = {
317 'show_perf_results': True,
318 'step_name': 'naclperf', # Seems unused, but is required.
319 'test_name': 'naclperf', # Really "Test Suite"
320 'expectations': True,
321 'perf_filename': ('native_client/tools/'
322 'nacl_perf_expectations/nacl_perf_expectations.json'),
324 # Locate the buildbot build directory by relative path, as it's absolute
325 # location varies by platform and configuration.
326 buildbot_build_dir = os.path.join(* [os.pardir] * 4)
327 runtest = os.path.join(buildbot_build_dir, 'scripts', 'slave', 'runtest.py')
328 # For builds with an actual build number, require that the script is present
329 # (i.e. that we're run from an actual buildbot).
330 if build_number is not None and not os.path.exists(runtest):
331 raise Exception('runtest.py script not found at: %s\n' % runtest)
332 cmd_exe = cmd.split(' ')[0]
333 cmd_exe_ext = os.path.splitext(cmd_exe)[1]
334 # Do not wrap these types of builds with runtest.py:
336 # - commands beginning with 'echo '
338 if not (slave_type == 'Trybot' or
340 cmd_exe_ext == '.bat'):
341 # Perf dashboards are now generated by output scraping that occurs in the
342 # script runtest.py, which lives in the buildbot repository.
343 # Non-trybot builds should be run through runtest, allowing it to upload
344 # perf data if relevant.
347 '--build-dir=src/out',
348 '--results-url=https://chromeperf.appspot.com',
349 '--annotate=graphing',
350 '--no-xvfb', # We provide our own xvfb invocation.
351 '--factory-properties', EscapeJson(factory_properties),
352 '--build-properties', EscapeJson(build_properties),
356 print "%s runs: %s\n" % (builder, cmd)
357 retcode = subprocess.call(cmd, env=env, shell=True)
361 if __name__ == '__main__':