Chromium Code Reviews| Index: scripts/slave/recipe_modules/pgo/example.py |
| diff --git a/scripts/slave/recipe_modules/pgo/example.py b/scripts/slave/recipe_modules/pgo/example.py |
| index 9ddacf3a42017d200e6b88c0d467289ca186e602..054503887cb0b4759561f5446e558242bec50d6a 100644 |
| --- a/scripts/slave/recipe_modules/pgo/example.py |
| +++ b/scripts/slave/recipe_modules/pgo/example.py |
| @@ -6,12 +6,12 @@ |
| # Recipe module dependencies. |
| DEPS = [ |
| + 'chromium', |
| + 'pgo', |
| 'recipe_engine/platform', |
| 'recipe_engine/properties', |
| - 'pgo', |
| ] |
| -from recipe_engine import recipe_test_api |
| from recipe_engine.recipe_api import Property |
| from recipe_engine.types import freeze |
| @@ -23,19 +23,18 @@ PROPERTIES = { |
| TEST_BUILDERS = freeze({ |
| 'chromium_pgo.test' : { |
| - 'Test builder': { |
| - 'recipe_config': 'chromium', |
| - 'chromium_config_instrument': 'chromium_pgo_instrument', |
| - 'chromium_config_optimize': 'chromium_pgo_optimize', |
| - 'gclient_config': 'chromium', |
| - 'clobber': True, |
| - 'patch_root': 'src', |
| - 'chromium_config_kwargs': { |
| - 'BUILD_CONFIG': 'Release', |
| - 'TARGET_BITS': 32, |
| - }, |
| - 'testing': { |
| - 'platform': 'win', |
| + 'builders': { |
| + 'Test builder': { |
| + 'recipe_config': 'chromium', |
| + 'chromium_config_instrument': 'chromium_pgo_instrument', |
| + 'chromium_config_optimize': 'chromium_pgo_optimize', |
| + 'gclient_config': 'chromium', |
| + 'chromium_config_kwargs': { |
| + 'BUILD_CONFIG': 'Release', |
| + 'TARGET_BITS': 32, |
| + }, |
| + 'patch_root': 'src', |
| + 'testing': { 'platform': 'win' }, |
| }, |
| }, |
| } |
| @@ -43,9 +42,8 @@ TEST_BUILDERS = freeze({ |
| def RunSteps(api, buildername): |
| - buildername = api.properties['buildername'] |
| mastername = api.properties['mastername'] |
| - bot_config = TEST_BUILDERS.get(mastername, {}).get(buildername) |
| + buildername, bot_config = api.chromium.configure_bot(TEST_BUILDERS, []) |
|
Nico
2016/06/01 23:36:55
This makes the file more similar to most other fil
|
| api.pgo.compile_pgo(bot_config) |
| @@ -54,8 +52,10 @@ def GenTests(api): |
| def _sanitize_nonalpha(text): |
| return ''.join(c if c.isalnum() else '_' for c in text) |
| - for mastername, builders in TEST_BUILDERS.iteritems(): |
| - for buildername in builders: |
| + # Don't use api.chromium.gen_tests_for_builders because that looks at a |
| + # builder's name to set the platform, but we want to set 'win'. |
| + for mastername in TEST_BUILDERS: |
| + for buildername in TEST_BUILDERS[mastername]['builders']: |
| yield ( |
| api.test('full_%s_%s' % (_sanitize_nonalpha(mastername), |
| _sanitize_nonalpha(buildername))) + |
| @@ -63,6 +63,7 @@ def GenTests(api): |
| api.platform('win', 64) |
| ) |
| + |
| yield ( |
| api.test('full_%s_%s_benchmark_failure' % |
| (_sanitize_nonalpha('chromium_pgo.test'), |