Chromium Code Reviews| Index: scripts/slave/recipes/chromium_trybot.py |
| diff --git a/scripts/slave/recipes/chromium_trybot.py b/scripts/slave/recipes/chromium_trybot.py |
| index 3f8e7f5f17a0de0bb8db711c2eab00fa13e6e386..afc915a9361a0a898a5d954cf8a65cff4584d136 100644 |
| --- a/scripts/slave/recipes/chromium_trybot.py |
| +++ b/scripts/slave/recipes/chromium_trybot.py |
| @@ -261,6 +261,16 @@ def GenSteps(api): |
| api.chromium.runhooks(), |
| ) |
| + # TODO(dpranke): crbug.com/353690. Remove the gn-specific steps from this |
| + # recipe and stand up a dedicated GN bot when the GN steps take up enough |
| + # resources to be worth it. For now, we run GN and generate files into a new |
| + # Debug_gn / Release_gn dir, and then run a compile in that dir. |
| + gn_build_config_dir = str(api.chromium.c.BUILD_CONFIG) + '_gn' |
| + gn_output_arg = '//out/' + gn_build_config_dir |
| + gn_output_dir = api.path['checkout'].join('out', gn_build_config_dir) |
| + should_run_gn = api.properties.get('buildername') in ('linux_chromium', |
| + 'linux_chromium_rel') |
| + |
| test_spec = api.step_history['read test spec'].json.output |
| test_spec = [s.encode('utf-8') for s in test_spec] |
| @@ -277,7 +287,14 @@ def GenSteps(api): |
| name='compile (with patch)', |
| abort_on_failure=False, |
| can_fail_build=False) |
| - if api.step_history['compile (with patch)'].retcode != 0: |
| + if should_run_gn: |
| + yield api.chromium.run_gn(gn_output_arg) |
| + yield api.chromium.compile_with_ninja('compile (gn with patch)', |
| + gn_output_dir) |
| + |
| + if ((api.step_history['compile (with patch)'].retcode != 0) or |
| + (should_run_gn and |
| + api.step_history['compile (gn with patch)'].retcode != 0)): |
|
Paweł Hajdan Jr.
2014/03/28 09:45:04
For the fallback to be useful please mark compile_
Dirk Pranke
2014/03/28 15:59:43
Good catch, will do.
|
| # Only use LKCR when compile fails. Note that requested specific revision |
| # can still override this. |
| api.gclient.set_config('chromium_lkcr') |
| @@ -303,6 +320,12 @@ def GenSteps(api): |
| force_clobber=True) |
| ) |
| + if should_run_gn: |
| + yield api.path.rmcontents('slave gn build directory', gn_output_dir) |
| + yield api.chromium.run_gn(gn_output_arg) |
| + yield api.chromium.compile_with_ninja( |
| + 'compile (gn with patch, lkcr, clobber)', gn_output_dir) |
| + |
| # Do not run tests if the build is already in a failed state. |
| if api.step_history.failed: |
| return |
| @@ -310,7 +333,12 @@ def GenSteps(api): |
| if recipe_config['compile_only']: |
| return |
| - # TODO(phajdan.jr): Make it possible to retry telemtry tests (add JSON). |
| + # TODO(dpranke): crbug.com/353690. It would be good to run gn_unittests |
| + # out of the gn build dir, but we can't use runtest() |
| + # because of the different output directory; this means |
| + # we don't get annotations and don't get retry of the tests for free :( . |
| + |
| + # TODO(phajdan.jr): Make it possible to retry telemetry tests (add JSON). |
| yield ( |
| api.chromium.run_telemetry_unittests(), |
| api.chromium.run_telemetry_perf_unittests(), |
| @@ -447,3 +475,21 @@ def GenTests(api): |
| api.step_data('compile (with patch, lkcr, clobber)', retcode=1) + |
| api.step_data('compile (with patch, lkcr, clobber, nuke)', retcode=1) |
| ) |
| + |
| + # TODO(dpranke): crbug.com/353690. |
| + # Remove this when we make GN a standalone recipe. |
| + yield ( |
| + api.test('unittest_should_run_gn') + |
| + api.properties.tryserver(buildername='linux_chromium', |
| + build_config='Debug') + |
| + api.platform.name('linux') + |
| + api.step_data('compile (gn with patch)') |
| + ) |
| + |
| + yield ( |
| + api.test('unittest_should_run_gn_compile_failure') + |
| + api.properties.tryserver(buildername='linux_chromium', |
| + build_config='Debug') + |
| + api.platform.name('linux') + |
| + api.step_data('compile (gn with patch)', retcode=1) |
| + ) |