| OLD | NEW |
| 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 | 5 |
| 6 """Utility class to build the Skia master BuildFactory's for Android buildbots. | 6 """Utility class to build the Skia master BuildFactory's for Android buildbots. |
| 7 | 7 |
| 8 Overrides SkiaFactory with any Android-specific steps.""" | 8 Overrides SkiaFactory with any Android-specific steps.""" |
| 9 | 9 |
| 10 | 10 |
| 11 from buildbot.process.properties import WithProperties | 11 from buildbot.process.properties import WithProperties |
| 12 from skia_master_scripts import factory as skia_factory | 12 from skia_master_scripts import factory as skia_factory |
| 13 | 13 |
| 14 | 14 |
| 15 class AndroidFactory(skia_factory.SkiaFactory): | 15 class AndroidFactory(skia_factory.SkiaFactory): |
| 16 """Overrides for Android builds.""" | 16 """Overrides for Android builds.""" |
| 17 | 17 |
| 18 def __init__(self, device, gm_args=None, test_args=None, **kwargs): | 18 def __init__(self, device, test_args=None, **kwargs): |
| 19 """ Instantiates an AndroidFactory with properties and build steps specific | 19 """ Instantiates an AndroidFactory with properties and build steps specific |
| 20 to Android devices. | 20 to Android devices. |
| 21 | 21 |
| 22 device: string indicating which Android device type we are targeting | 22 device: string indicating which Android device type we are targeting |
| 23 """ | 23 """ |
| 24 skia_factory.SkiaFactory.__init__(self, bench_pictures_cfg=device, | 24 skia_factory.SkiaFactory.__init__(self, bench_pictures_cfg=device, |
| 25 deps_target_os='android', | 25 deps_target_os='android', |
| 26 flavor='android', | 26 flavor='android', |
| 27 build_targets=['all'], | 27 build_targets=['all'], |
| 28 gm_args=list(gm_args or []) + ['--nopdf'], | |
| 29 test_args=list(test_args or []) + \ | 28 test_args=list(test_args or []) + \ |
| 30 ['--match', '~Threaded'], | 29 ['--match', '~Threaded'], |
| 31 **kwargs) | 30 **kwargs) |
| 32 self._device = device | 31 self._device = device |
| 33 self._common_args += ['--device', self._device, | 32 self._common_args += ['--device', self._device, |
| 34 '--serial', WithProperties('%(serial:-None)s'), | 33 '--serial', WithProperties('%(serial:-None)s'), |
| 35 '--has_root', WithProperties('%(has_root:-True)s'), | 34 '--has_root', WithProperties('%(has_root:-True)s'), |
| 36 '--android_sdk_root', | 35 '--android_sdk_root', |
| 37 WithProperties('%(android_sdk_root)s')] | 36 WithProperties('%(android_sdk_root)s')] |
| 38 self._default_clobber = True | 37 self._default_clobber = True |
| 39 | 38 |
| 40 | 39 |
| 41 def PreRender(self): | 40 def PreRender(self): |
| 42 """ Before chaining to SkiaFactory.PreRender(), build tools (skdiff, | 41 """ Before chaining to SkiaFactory.PreRender(), build tools (skdiff, |
| 43 skimage) that we might need on the buildslave host machine. """ | 42 skimage) that we might need on the buildslave host machine. """ |
| 44 # We bypass the Android-flavored compile in order to build tools for | 43 # We bypass the Android-flavored compile in order to build tools for |
| 45 # the host. | 44 # the host. |
| 46 self.AddSlaveScript(script='compile.py', | 45 self.AddSlaveScript(script='compile.py', |
| 47 description='BuildHostTools', | 46 description='BuildHostTools', |
| 48 is_rebaseline_step=True, | 47 is_rebaseline_step=True, |
| 49 args=['--target', 'tools', | 48 args=['--target', 'tools', |
| 50 '--gyp_defines', | 49 '--gyp_defines', |
| 51 ' '.join('%s=%s' % (k, v) | 50 ' '.join('%s=%s' % (k, v) |
| 52 for k, v in self._gyp_defines.items())]) | 51 for k, v in self._gyp_defines.items())]) |
| 53 skia_factory.SkiaFactory.PreRender(self) | 52 skia_factory.SkiaFactory.PreRender(self) |
| OLD | NEW |