OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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.types import freeze | 7 from recipe_engine.types import freeze |
8 from recipe_engine import recipe_api | 8 from recipe_engine import recipe_api |
9 | 9 |
10 DEPS = [ | 10 DEPS = [ |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 # Upload a stamp file to inform any observers that the upload is complete. | 156 # Upload a stamp file to inform any observers that the upload is complete. |
157 stamp_path = api.path.mkdtemp('upload_stamp').join('stamp') | 157 stamp_path = api.path.mkdtemp('upload_stamp').join('stamp') |
158 api.file.write('Create upload stamp', stamp_path, 'Upload complete') | 158 api.file.write('Create upload stamp', stamp_path, 'Upload complete') |
159 api.gsutil.upload(stamp_path, bucket, '%s/stamp' % gs_path) | 159 api.gsutil.upload(stamp_path, bucket, '%s/stamp' % gs_path) |
160 api.gsutil.upload(stamp_path, bucket, '%s/stamp' % gs_latest_path) | 160 api.gsutil.upload(stamp_path, bucket, '%s/stamp' % gs_latest_path) |
161 | 161 |
162 | 162 |
163 @recipe_api.composite_step | 163 @recipe_api.composite_step |
164 def _RunApptests(api): | 164 def _RunApptests(api): |
| 165 # TODO(msw): Run and get compile targets via testing/scripts/mojo_apptests.py. |
165 runner = api.path['checkout'].join('mojo', 'tools', 'apptest_runner.py') | 166 runner = api.path['checkout'].join('mojo', 'tools', 'apptest_runner.py') |
166 api.python('app_tests', runner, [api.chromium.output_dir, '--verbose']) | 167 api.python('app_tests', runner, [api.chromium.output_dir, '--verbose']) |
167 | 168 |
168 | 169 |
169 def _RunUnitAndAppTests(api): | 170 def _RunUnitAndAppTests(api): |
170 with api.step.defer_results(): | 171 with api.step.defer_results(): |
171 api.chromium.runtest('html_viewer_unittests') | 172 api.chromium.runtest('html_viewer_unittests') |
172 api.chromium.runtest('ipc_mojo_unittests') | 173 api.chromium.runtest('ipc_mojo_unittests') |
173 api.chromium.runtest('mojo_common_unittests') | 174 api.chromium.runtest('mojo_common_unittests') |
174 api.chromium.runtest('mojo_public_application_unittests') | 175 api.chromium.runtest('mojo_public_application_unittests') |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 api.chromium.configure_bot(BUILDERS, ['gn']) | 224 api.chromium.configure_bot(BUILDERS, ['gn']) |
224 | 225 |
225 api.bot_update.ensure_checkout(force=True) | 226 api.bot_update.ensure_checkout(force=True) |
226 | 227 |
227 api.chromium.runhooks() | 228 api.chromium.runhooks() |
228 | 229 |
229 api.chromium.run_mb(api.properties.get('mastername'), | 230 api.chromium.run_mb(api.properties.get('mastername'), |
230 api.properties.get('buildername'), | 231 api.properties.get('buildername'), |
231 use_goma=True) | 232 use_goma=True) |
232 | 233 |
233 api.chromium.compile(targets=['mandoline:all']) | 234 api.chromium.compile(targets=['mandoline:all', 'mash/wm:tests']) |
234 | 235 |
235 if api.chromium.c.TARGET_PLATFORM == 'android': | 236 if api.chromium.c.TARGET_PLATFORM == 'android': |
236 api.chromium_android.detect_and_setup_devices() | 237 api.chromium_android.detect_and_setup_devices() |
237 | 238 |
238 bot_config = _GetBotConfig(api) | 239 bot_config = _GetBotConfig(api) |
239 if bot_config.get('run_perf_tests', False): | 240 if bot_config.get('run_perf_tests', False): |
240 _RunPerfTests(api, bot_config['perf_test_info']) | 241 _RunPerfTests(api, bot_config['perf_test_info']) |
241 else: | 242 else: |
242 _RunUnitAndAppTests(api) | 243 _RunUnitAndAppTests(api) |
243 _UploadMandolineToGoogleStorage(api) | 244 _UploadMandolineToGoogleStorage(api) |
244 | 245 |
245 | 246 |
246 def GenTests(api): | 247 def GenTests(api): |
247 for test in api.chromium.gen_tests_for_builders(BUILDERS): | 248 for test in api.chromium.gen_tests_for_builders(BUILDERS): |
248 yield test | 249 yield test |
249 | 250 |
250 # Ensure upload is skipped if version/platform binaries are already uploaded. | 251 # Ensure upload is skipped if version/platform binaries are already uploaded. |
251 test = api.test('test_upload_skipped_for_existing_binaries') | 252 test = api.test('test_upload_skipped_for_existing_binaries') |
252 test += api.platform.name('linux') | 253 test += api.platform.name('linux') |
253 test += api.properties.generic(buildername='Chromium Mojo Android', | 254 test += api.properties.generic(buildername='Chromium Mojo Android', |
254 mastername='chromium.mojo') | 255 mastername='chromium.mojo') |
255 # This relies on api.chromium.get_version's hard-coded step_test_data version. | 256 # This relies on api.chromium.get_version's hard-coded step_test_data version. |
256 test_ls = api.raw_io.output('gs://mandoline/37.0.2021.0/android/') | 257 test_ls = api.raw_io.output('gs://mandoline/37.0.2021.0/android/') |
257 test += api.step_data('gsutil ls gs://mandoline/', stdout=test_ls) | 258 test += api.step_data('gsutil ls gs://mandoline/', stdout=test_ls) |
258 test += api.step_data('gsutil ls gs://mandoline/37.0.2021.0', stdout=test_ls) | 259 test += api.step_data('gsutil ls gs://mandoline/37.0.2021.0', stdout=test_ls) |
259 yield test | 260 yield test |
OLD | NEW |