| Index: scripts/slave/recipes/chromium_trybot.py
|
| diff --git a/scripts/slave/recipes/chromium_trybot.py b/scripts/slave/recipes/chromium_trybot.py
|
| index 84bc5978256d11ed7fd238a25be11adf4fbdaa44..e3feedb5a4badf04de20ad34fb7a718b077da822 100644
|
| --- a/scripts/slave/recipes/chromium_trybot.py
|
| +++ b/scripts/slave/recipes/chromium_trybot.py
|
| @@ -268,6 +268,15 @@ def GenSteps(api):
|
| else:
|
| yield 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_output_dir = api.path['slave_build'].join(api.chromium.c.BUILD_CONFIG +
|
| + '_gn')
|
| + 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]
|
|
|
| @@ -284,7 +293,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_dir)
|
| + 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)):
|
| # Only use LKCR when compile fails. Note that requested specific revision
|
| # can still override this.
|
| api.gclient.set_config('chromium_lkcr')
|
| @@ -316,6 +332,12 @@ def GenSteps(api):
|
| name='compile (with patch, lkcr, clobber)',
|
| 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_dir)
|
| + 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
|
| @@ -323,7 +345,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(),
|
| @@ -459,3 +486,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)
|
| + )
|
|
|