| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import argparse | 5 import argparse |
| 6 import datetime | 6 import datetime |
| 7 import random | 7 import random |
| 8 import re | 8 import re |
| 9 import urllib | 9 import urllib |
| 10 | 10 |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 build_environment.update(self.c.gyp_env.as_jsonish()) | 275 build_environment.update(self.c.gyp_env.as_jsonish()) |
| 276 if 'GYP_DEFINES' in build_environment: | 276 if 'GYP_DEFINES' in build_environment: |
| 277 # Filter out gomadir. | 277 # Filter out gomadir. |
| 278 build_environment['GYP_DEFINES'] = ' '.join( | 278 build_environment['GYP_DEFINES'] = ' '.join( |
| 279 d for d in build_environment['GYP_DEFINES'].split() | 279 d for d in build_environment['GYP_DEFINES'].split() |
| 280 if not d.startswith('gomadir') | 280 if not d.startswith('gomadir') |
| 281 ) | 281 ) |
| 282 return build_environment | 282 return build_environment |
| 283 | 283 |
| 284 def setup_mips_toolchain(self): | 284 def setup_mips_toolchain(self): |
| 285 mips_dir = self.m.infra_paths['slave_build'].join(MIPS_DIR, 'bin') | 285 mips_dir = self.m.path['slave_build'].join(MIPS_DIR, 'bin') |
| 286 if not self.m.path.exists(mips_dir): | 286 if not self.m.path.exists(mips_dir): |
| 287 self.m.gsutil.download_url( | 287 self.m.gsutil.download_url( |
| 288 'gs://chromium-v8/%s' % MIPS_TOOLCHAIN, | 288 'gs://chromium-v8/%s' % MIPS_TOOLCHAIN, |
| 289 self.m.infra_paths['slave_build'], | 289 self.m.path['slave_build'], |
| 290 name='bootstrapping mips toolchain') | 290 name='bootstrapping mips toolchain') |
| 291 self.m.step('unzipping', | 291 self.m.step('unzipping', |
| 292 ['tar', 'xf', MIPS_TOOLCHAIN], | 292 ['tar', 'xf', MIPS_TOOLCHAIN], |
| 293 cwd=self.m.infra_paths['slave_build']) | 293 cwd=self.m.path['slave_build']) |
| 294 | 294 |
| 295 self.c.gyp_env.CC = self.m.path.join(mips_dir, 'mips-linux-gnu-gcc') | 295 self.c.gyp_env.CC = self.m.path.join(mips_dir, 'mips-linux-gnu-gcc') |
| 296 self.c.gyp_env.CXX = self.m.path.join(mips_dir, 'mips-linux-gnu-g++') | 296 self.c.gyp_env.CXX = self.m.path.join(mips_dir, 'mips-linux-gnu-g++') |
| 297 self.c.gyp_env.AR = self.m.path.join(mips_dir, 'mips-linux-gnu-ar') | 297 self.c.gyp_env.AR = self.m.path.join(mips_dir, 'mips-linux-gnu-ar') |
| 298 self.c.gyp_env.RANLIB = self.m.path.join(mips_dir, 'mips-linux-gnu-ranlib') | 298 self.c.gyp_env.RANLIB = self.m.path.join(mips_dir, 'mips-linux-gnu-ranlib') |
| 299 self.c.gyp_env.LINK = self.m.path.join(mips_dir, 'mips-linux-gnu-g++') | 299 self.c.gyp_env.LINK = self.m.path.join(mips_dir, 'mips-linux-gnu-g++') |
| 300 | 300 |
| 301 @property | 301 @property |
| 302 def bot_type(self): | 302 def bot_type(self): |
| 303 return self.bot_config.get('bot_type', 'builder_tester') | 303 return self.bot_config.get('bot_type', 'builder_tester') |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 | 366 |
| 367 def compile(self, **kwargs): | 367 def compile(self, **kwargs): |
| 368 self.m.chromium.compile(**kwargs) | 368 self.m.chromium.compile(**kwargs) |
| 369 self.isolate_tests() | 369 self.isolate_tests() |
| 370 | 370 |
| 371 # TODO(machenbach): This should move to a dynamorio module as soon as one | 371 # TODO(machenbach): This should move to a dynamorio module as soon as one |
| 372 # exists. | 372 # exists. |
| 373 def dr_compile(self): | 373 def dr_compile(self): |
| 374 self.m.file.makedirs( | 374 self.m.file.makedirs( |
| 375 'Create Build Dir', | 375 'Create Build Dir', |
| 376 self.m.infra_paths['slave_build'].join('dynamorio', 'build')) | 376 self.m.path['slave_build'].join('dynamorio', 'build')) |
| 377 self.m.step( | 377 self.m.step( |
| 378 'Configure Release x64 DynamoRIO', | 378 'Configure Release x64 DynamoRIO', |
| 379 ['cmake', '..', '-DDEBUG=OFF'], | 379 ['cmake', '..', '-DDEBUG=OFF'], |
| 380 cwd=self.m.infra_paths['slave_build'].join('dynamorio', 'build'), | 380 cwd=self.m.path['slave_build'].join('dynamorio', 'build'), |
| 381 ) | 381 ) |
| 382 self.m.step( | 382 self.m.step( |
| 383 'Compile Release x64 DynamoRIO', | 383 'Compile Release x64 DynamoRIO', |
| 384 ['make', '-j5'], | 384 ['make', '-j5'], |
| 385 cwd=self.m.infra_paths['slave_build'].join('dynamorio', 'build'), | 385 cwd=self.m.path['slave_build'].join('dynamorio', 'build'), |
| 386 ) | 386 ) |
| 387 | 387 |
| 388 @property | 388 @property |
| 389 def run_dynamorio(self): | 389 def run_dynamorio(self): |
| 390 return self.m.gclient.c.solutions[-1].name == 'dynamorio' | 390 return self.m.gclient.c.solutions[-1].name == 'dynamorio' |
| 391 | 391 |
| 392 def upload_build(self, name_suffix='', archive=None): | 392 def upload_build(self, name_suffix='', archive=None): |
| 393 archive = archive or self.GS_ARCHIVES[self.bot_config['build_gs_archive']] | 393 archive = archive or self.GS_ARCHIVES[self.bot_config['build_gs_archive']] |
| 394 self.m.archive.zip_and_upload_build( | 394 self.m.archive.zip_and_upload_build( |
| 395 'package build' + name_suffix, | 395 'package build' + name_suffix, |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 904 variants += test.get('variants', variants) | 904 variants += test.get('variants', variants) |
| 905 variants += test_step_config.variants | 905 variants += test_step_config.variants |
| 906 full_args += variants.test_args | 906 full_args += variants.test_args |
| 907 | 907 |
| 908 # Add step-specific test arguments. | 908 # Add step-specific test arguments. |
| 909 full_args += test_step_config.test_args | 909 full_args += test_step_config.test_args |
| 910 | 910 |
| 911 full_args = self._with_extra_flags(full_args) | 911 full_args = self._with_extra_flags(full_args) |
| 912 | 912 |
| 913 if self.run_dynamorio: | 913 if self.run_dynamorio: |
| 914 drrun = self.m.infra_paths['slave_build'].join( | 914 drrun = self.m.path['slave_build'].join( |
| 915 'dynamorio', 'build', 'bin64', 'drrun') | 915 'dynamorio', 'build', 'bin64', 'drrun') |
| 916 full_args += [ | 916 full_args += [ |
| 917 '--command_prefix', | 917 '--command_prefix', |
| 918 '%s -reset_every_nth_pending 0 --' % drrun, | 918 '%s -reset_every_nth_pending 0 --' % drrun, |
| 919 ] | 919 ] |
| 920 | 920 |
| 921 # Indicate whether DCHECKs were enabled. | 921 # Indicate whether DCHECKs were enabled. |
| 922 if self.m.chromium.c.gyp_env.GYP_DEFINES.get('dcheck_always_on') == 1: | 922 if self.m.chromium.c.gyp_env.GYP_DEFINES.get('dcheck_always_on') == 1: |
| 923 full_args.append('--dcheck-always-on') | 923 full_args.append('--dcheck-always-on') |
| 924 | 924 |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1125 def report_culprits(self, culprit_range): | 1125 def report_culprits(self, culprit_range): |
| 1126 assert culprit_range | 1126 assert culprit_range |
| 1127 if len(culprit_range) > 1: | 1127 if len(culprit_range) > 1: |
| 1128 text = 'Suspecting multiple commits' | 1128 text = 'Suspecting multiple commits' |
| 1129 else: | 1129 else: |
| 1130 text = 'Suspecting %s' % culprit_range[0][:8] | 1130 text = 'Suspecting %s' % culprit_range[0][:8] |
| 1131 | 1131 |
| 1132 step_result = self.m.step(text, cmd=None) | 1132 step_result = self.m.step(text, cmd=None) |
| 1133 for culprit in culprit_range: | 1133 for culprit in culprit_range: |
| 1134 step_result.presentation.links[culprit[:8]] = COMMIT_TEMPLATE % culprit | 1134 step_result.presentation.links[culprit[:8]] = COMMIT_TEMPLATE % culprit |
| OLD | NEW |