OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 """Utility class to build the chromium master BuildFactory's. | 5 """Utility class to build the chromium master BuildFactory's. |
6 | 6 |
7 Based on gclient_factory.py and adds chromium-specific steps.""" | 7 Based on gclient_factory.py and adds chromium-specific steps.""" |
8 | 8 |
9 import os | 9 import os |
10 import re | 10 import re |
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
871 | 871 |
872 tests_for_build = [ | 872 tests_for_build = [ |
873 re.match('^(?:valgrind_|heapcheck_)?(.*)$', t).group(1) for t in tests] | 873 re.match('^(?:valgrind_|heapcheck_)?(.*)$', t).group(1) for t in tests] |
874 | 874 |
875 # Ensure that component is set correctly in the gyp defines. | 875 # Ensure that component is set correctly in the gyp defines. |
876 ForceComponent(target, project, factory_properties['gclient_env']) | 876 ForceComponent(target, project, factory_properties['gclient_env']) |
877 | 877 |
878 # Ensure GYP errors out if files referenced in .gyp files are missing. | 878 # Ensure GYP errors out if files referenced in .gyp files are missing. |
879 self.ForceMissingFilesToBeFatal(project, factory_properties['gclient_env']) | 879 self.ForceMissingFilesToBeFatal(project, factory_properties['gclient_env']) |
880 | 880 |
| 881 is_windows_asan_builder = (slave_type == 'Builder' and |
| 882 self._target_platform == 'win32' and |
| 883 factory_properties.get('asan')) |
| 884 |
881 factory = self.BuildFactory(target, clobber, tests_for_build, mode, | 885 factory = self.BuildFactory(target, clobber, tests_for_build, mode, |
882 slave_type, options, compile_timeout, build_url, | 886 slave_type, options, compile_timeout, build_url, |
883 project, factory_properties, | 887 project, factory_properties, |
884 gclient_deps=gclient_deps) | 888 gclient_deps=gclient_deps, |
| 889 add_archive_steps=(not is_windows_asan_builder)) |
885 | 890 |
886 # Get the factory command object to create new steps to the factory. | 891 # Get the factory command object to create new steps to the factory. |
887 chromium_cmd_obj = chromium_commands.ChromiumCommands(factory, | 892 chromium_cmd_obj = chromium_commands.ChromiumCommands(factory, |
888 target, | 893 target, |
889 self._build_dir, | 894 self._build_dir, |
890 self._target_platform) | 895 self._target_platform) |
891 | 896 |
| 897 # Add ASANification step for windows |
| 898 # MUST BE FIRST STEP ADDED AFTER BuildFactory CALL in order to add back |
| 899 # the ZipBuild step in it's expected place |
| 900 if is_windows_asan_builder: |
| 901 chromium_cmd_obj.AddWindowsASANStep() |
| 902 # Need to add the Zip Build step back |
| 903 chromium_cmd_obj.AddZipBuild(halt_on_failure=True, |
| 904 factory_properties=factory_properties) |
| 905 |
892 # Add this archive build step. | 906 # Add this archive build step. |
893 if factory_properties.get('archive_build'): | 907 if factory_properties.get('archive_build'): |
894 chromium_cmd_obj.AddArchiveBuild(factory_properties=factory_properties) | 908 chromium_cmd_obj.AddArchiveBuild(factory_properties=factory_properties) |
895 | 909 |
896 if factory_properties.get('asan_archive_build'): | 910 if factory_properties.get('asan_archive_build'): |
897 chromium_cmd_obj.AddAsanArchiveBuild( | 911 chromium_cmd_obj.AddAsanArchiveBuild( |
898 factory_properties=factory_properties) | 912 factory_properties=factory_properties) |
899 | 913 |
900 # Add the package source step. | 914 # Add the package source step. |
901 if slave_type == 'Indexer': | 915 if slave_type == 'Indexer': |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1264 build_dir=web_build_dir) | 1278 build_dir=web_build_dir) |
1265 chromium_cmd_obj.AddChromebotServer(factory_properties) | 1279 chromium_cmd_obj.AddChromebotServer(factory_properties) |
1266 chromium_cmd_obj.AddReliabilityTests(client_os) | 1280 chromium_cmd_obj.AddReliabilityTests(client_os) |
1267 elif slave_type == 'ChromebotClient': | 1281 elif slave_type == 'ChromebotClient': |
1268 chromium_cmd_obj.AddGetBuildForChromebot(client_os, | 1282 chromium_cmd_obj.AddGetBuildForChromebot(client_os, |
1269 extract=True, | 1283 extract=True, |
1270 build_url=build_url) | 1284 build_url=build_url) |
1271 chromium_cmd_obj.AddChromebotClient(factory_properties) | 1285 chromium_cmd_obj.AddChromebotClient(factory_properties) |
1272 | 1286 |
1273 return factory | 1287 return factory |
OLD | NEW |