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

Side by Side Diff: slave/skia_slave_scripts/flavor_utils/android_build_step_utils.py

Issue 219763003: reland "make bots call android_ninja instead of android_make" (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: fixes Created 6 years, 8 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
« no previous file with comments | « slave/skia_slave_scripts/build_step.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 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 """ Utilities for Android build steps. """ 5 """ Utilities for Android build steps. """
6 6
7 from default_build_step_utils import DefaultBuildStepUtils, DeviceDirs 7 from default_build_step_utils import DefaultBuildStepUtils, DeviceDirs
8 from utils import android_utils 8 from utils import android_utils
9 from utils import gs_utils 9 from utils import gs_utils
10 from utils import shell_utils 10 from utils import shell_utils
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 except Exception: 110 except Exception:
111 # If we fail to kill the process, try rebooting the device, and wait for 111 # If we fail to kill the process, try rebooting the device, and wait for
112 # it to come back up. 112 # it to come back up.
113 shell_utils.run([android_utils.PATH_TO_ADB, '-s', self._serial, 113 shell_utils.run([android_utils.PATH_TO_ADB, '-s', self._serial,
114 'reboot']) 114 'reboot'])
115 time.sleep(60) 115 time.sleep(60)
116 android_utils.StopShell(self._serial) 116 android_utils.StopShell(self._serial)
117 else: 117 else:
118 android_utils.ADBKill(self._serial, 'com.skia', kill_app=True) 118 android_utils.ADBKill(self._serial, 'com.skia', kill_app=True)
119 119
120 def RunGYP(self):
121 print 'android_ninja handles gyp'
122 pass
123
120 def Compile(self, target): 124 def Compile(self, target):
121 """ Compile the Skia executables. """ 125 """ Compile the Skia executables. """
122 os.environ['SKIA_ANDROID_VERBOSE_SETUP'] = '1' 126 os.environ['SKIA_ANDROID_VERBOSE_SETUP'] = '1'
123 os.environ['PATH'] = os.path.abspath( 127 os.environ['PATH'] = os.path.abspath(
124 os.path.join(os.pardir, os.pardir, os.pardir, os.pardir, 'third_party', 128 os.path.join(os.pardir, os.pardir, os.pardir, os.pardir, 'third_party',
125 'gsutil')) + os.pathsep + os.environ['PATH'] 129 'gsutil')) + os.pathsep + os.environ['PATH']
126 os.environ['BOTO_CONFIG'] = os.path.abspath(os.path.join( 130 os.environ['BOTO_CONFIG'] = os.path.abspath(os.path.join(
127 os.pardir, os.pardir, os.pardir, os.pardir, 'site_config', '.boto')) 131 os.pardir, os.pardir, os.pardir, os.pardir, 'site_config', '.boto'))
128 os.environ['ANDROID_SDK_ROOT'] = self._step.args['android_sdk_root'] 132 os.environ['ANDROID_SDK_ROOT'] = self._step.args['android_sdk_root']
129 os.environ['GYP_DEFINES'] = self._step.args['gyp_defines'] 133 os.environ['GYP_DEFINES'] = self._step.args['gyp_defines']
130 print 'GYP_DEFINES="%s"' % os.environ['GYP_DEFINES'] 134 print 'GYP_DEFINES="%s"' % os.environ['GYP_DEFINES']
131 cmd = [os.path.join('platform_tools', 'android', 'bin', 'android_make'), 135 os.environ['BUILDTYPE'] = self._step.configuration
136 print 'BUILDTYPE="%s"' % os.environ['BUILDTYPE']
137 cmd = [os.path.join('platform_tools', 'android', 'bin', 'android_ninja'),
132 target, 138 target,
133 '-d', self._step.args['device'], 139 '-d', self._step.args['device'],
134 'BUILDTYPE=%s' % self._step.configuration,
135 ] 140 ]
136 cmd.extend(self._step.default_make_flags) 141 cmd.extend(self._step.default_ninja_flags)
137 if os.name != 'nt': 142 if os.name != 'nt':
138 try: 143 try:
139 ccache = shell_utils.run(['which', 'ccache']).rstrip() 144 ccache = shell_utils.run(['which', 'ccache']).rstrip()
140 if ccache: 145 if ccache:
141 os.environ['ANDROID_MAKE_CCACHE'] = ccache 146 os.environ['ANDROID_MAKE_CCACHE'] = ccache
142 except Exception: 147 except Exception:
143 pass 148 pass
144 cmd.extend(self._step.make_flags) 149 cmd.extend(self._step.make_flags)
145 shell_utils.run(cmd) 150 shell_utils.run(cmd)
146 151
(...skipping 13 matching lines...) Expand all
160 gm_actual_dir=prefix + 'gm_actual', 165 gm_actual_dir=prefix + 'gm_actual',
161 gm_expected_dir=prefix + 'gm_expected', 166 gm_expected_dir=prefix + 'gm_expected',
162 resource_dir=prefix + 'resources', 167 resource_dir=prefix + 'resources',
163 skimage_in_dir=prefix + 'skimage_in', 168 skimage_in_dir=prefix + 'skimage_in',
164 skimage_expected_dir=prefix + 'skimage_expected', 169 skimage_expected_dir=prefix + 'skimage_expected',
165 skimage_out_dir=prefix + 'skimage_out', 170 skimage_out_dir=prefix + 'skimage_out',
166 skp_dir=prefix + 'skp', 171 skp_dir=prefix + 'skp',
167 skp_perf_dir=prefix + 'skp_perf', 172 skp_perf_dir=prefix + 'skp_perf',
168 skp_out_dir=prefix + 'skp_out', 173 skp_out_dir=prefix + 'skp_out',
169 tmp_dir=prefix + 'tmp_dir') 174 tmp_dir=prefix + 'tmp_dir')
OLDNEW
« no previous file with comments | « slave/skia_slave_scripts/build_step.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698