Chromium Code Reviews| Index: scripts/slave/recipe_modules/chromium/test_api.py |
| diff --git a/scripts/slave/recipe_modules/chromium/test_api.py b/scripts/slave/recipe_modules/chromium/test_api.py |
| index 62375630e874a9e3c02aebaa4fe5556bfc4fa50f..7638892b79ecd948ec62b6ea55031b0e3264b64c 100644 |
| --- a/scripts/slave/recipe_modules/chromium/test_api.py |
| +++ b/scripts/slave/recipe_modules/chromium/test_api.py |
| @@ -11,3 +11,31 @@ class ChromiumTestApi(recipe_test_api.RecipeTestApi): |
| @property |
| def builders(self): |
| return builders.BUILDERS |
| + |
| + def gen_tests_for_builders(self, builder_dict): |
| + # TODO: crbug.com/354674. Figure out where to put "simulation" |
| + # tests. Is this really the right place? |
|
iannucci
2014/12/12 23:45:19
this is an OK place... the test api can contain wh
|
| + |
| + def _sanitize_nonalpha(text): |
| + return ''.join(c if c.isalnum() else '_' for c in text) |
| + |
| + for mastername in builder_dict: |
| + for buildername in builder_dict[mastername]['builders']: |
| + if 'mac' in buildername or 'Mac' in buildername: |
| + platform_name = 'mac' |
| + elif 'win' in buildername or 'Win' in buildername: |
| + platform_name = 'win' |
| + else: |
| + platform_name = 'linux' |
| + test = ( |
| + self.test('full_%s_%s' % (_sanitize_nonalpha(mastername), |
| + _sanitize_nonalpha(buildername))) + |
| + self.m.platform.name(platform_name) |
| + ) |
| + if mastername.startswith('tryserver'): |
| + test += self.m.properties.tryserver(buildername=buildername, |
| + mastername=mastername) |
| + else: |
| + test += self.m.properties.generic(buildername=buildername, |
| + mastername=mastername) |
| + yield test |