| 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 re | 5 import re |
| 6 | 6 |
| 7 from recipe_engine import recipe_api | 7 from recipe_engine import recipe_api |
| 8 from recipe_engine import util as recipe_util | 8 from recipe_engine import util as recipe_util |
| 9 | 9 |
| 10 class TestLauncherFilterFileInputPlaceholder(recipe_util.Placeholder): | 10 class TestLauncherFilterFileInputPlaceholder(recipe_util.InputPlaceholder): |
| 11 def __init__(self, api, tests): | 11 def __init__(self, api, tests): |
| 12 self.raw = api.m.raw_io.input('\n'.join(tests)) | 12 self.raw = api.m.raw_io.input('\n'.join(tests)) |
| 13 super(TestLauncherFilterFileInputPlaceholder, self).__init__() | 13 super(TestLauncherFilterFileInputPlaceholder, self).__init__() |
| 14 | 14 |
| 15 def render(self, test): | 15 def render(self, test): |
| 16 result = self.raw.render(test) | 16 result = self.raw.render(test) |
| 17 if not test.enabled: # pragma: no cover | 17 if not test.enabled: # pragma: no cover |
| 18 result[0] = '--test-launcher-filter-file=%s' % result[0] | 18 result[0] = '--test-launcher-filter-file=%s' % result[0] |
| 19 return result | 19 return result |
| 20 | 20 |
| 21 def result(self, presentation, test): | 21 def cleanup(self, test_enabled): |
| 22 return self.raw.result(presentation, test) | 22 self.raw.cleanup(test_enabled) |
| 23 | 23 |
| 24 | 24 |
| 25 class ChromiumApi(recipe_api.RecipeApi): | 25 class ChromiumApi(recipe_api.RecipeApi): |
| 26 def __init__(self, *args, **kwargs): | 26 def __init__(self, *args, **kwargs): |
| 27 super(ChromiumApi, self).__init__(*args, **kwargs) | 27 super(ChromiumApi, self).__init__(*args, **kwargs) |
| 28 self._build_properties = None | 28 self._build_properties = None |
| 29 | 29 |
| 30 def get_config_defaults(self): | 30 def get_config_defaults(self): |
| 31 return { | 31 return { |
| 32 'HOST_PLATFORM': self.m.platform.name, | 32 'HOST_PLATFORM': self.m.platform.name, |
| (...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 703 })) | 703 })) |
| 704 | 704 |
| 705 def get_annotate_by_test_name(self, test_name): | 705 def get_annotate_by_test_name(self, test_name): |
| 706 return 'graphing' | 706 return 'graphing' |
| 707 | 707 |
| 708 def download_lto_plugin(self): | 708 def download_lto_plugin(self): |
| 709 return self.m.python( | 709 return self.m.python( |
| 710 name='download LTO plugin', | 710 name='download LTO plugin', |
| 711 script=self.m.path['checkout'].join( | 711 script=self.m.path['checkout'].join( |
| 712 'build', 'download_gold_plugin.py')) | 712 'build', 'download_gold_plugin.py')) |
| OLD | NEW |