| OLD | NEW |
| (Empty) |
| 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 | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 import re | |
| 6 | |
| 7 from recipe_engine.types import freeze | |
| 8 from recipe_engine import recipe_api | |
| 9 | |
| 10 DEPS = [ | |
| 11 'depot_tools/bot_update', | |
| 12 'chromium', | |
| 13 'chromium_android', | |
| 14 'recipe_engine/path', | |
| 15 'recipe_engine/properties', | |
| 16 'recipe_engine/python', | |
| 17 'recipe_engine/step', | |
| 18 ] | |
| 19 | |
| 20 BUILDERS = freeze({ | |
| 21 'chromium.mojo': { | |
| 22 'builders': { | |
| 23 'Chromium Mojo Linux': { | |
| 24 'chromium_config_kwargs': { | |
| 25 'BUILD_CONFIG': 'Release', | |
| 26 'TARGET_PLATFORM': 'linux', | |
| 27 }, | |
| 28 }, | |
| 29 'Chromium Mojo Android': { | |
| 30 'chromium_config': 'android', | |
| 31 'chromium_config_kwargs': { | |
| 32 'BUILD_CONFIG': 'Release', | |
| 33 'TARGET_PLATFORM': 'android', | |
| 34 'TARGET_ARCH': 'arm', | |
| 35 'TARGET_BITS': 32, | |
| 36 }, | |
| 37 'gclient_apply_config': ['android'], | |
| 38 }, | |
| 39 'Chromium Mojo Windows': { | |
| 40 'chromium_config_kwargs': { | |
| 41 'BUILD_CONFIG': 'Release', | |
| 42 'TARGET_PLATFORM': 'win', | |
| 43 }, | |
| 44 }, | |
| 45 }, | |
| 46 }, | |
| 47 }) | |
| 48 | |
| 49 | |
| 50 @recipe_api.composite_step | |
| 51 def _RunApptests(api): | |
| 52 # TODO(msw): Run and get compile targets via testing/scripts/mojo_apptests.py. | |
| 53 runner = api.path['checkout'].join('mojo', 'tools', 'apptest_runner.py') | |
| 54 api.python('app_tests', runner, [api.chromium.output_dir, '--verbose']) | |
| 55 | |
| 56 | |
| 57 @recipe_api.composite_step | |
| 58 def _RunUnittests(api): | |
| 59 if api.chromium.c.TARGET_PLATFORM != 'android': | |
| 60 api.chromium.runtest('views_mus_unittests', xvfb=True) | |
| 61 | |
| 62 | |
| 63 def RunSteps(api): | |
| 64 api.chromium.configure_bot(BUILDERS, ['gn']) | |
| 65 | |
| 66 api.bot_update.ensure_checkout(force=True) | |
| 67 | |
| 68 api.chromium.runhooks() | |
| 69 | |
| 70 api.chromium.run_mb(api.properties.get('mastername'), | |
| 71 api.properties.get('buildername'), | |
| 72 use_goma=True) | |
| 73 | |
| 74 api.chromium.compile(targets=['mojo_apptests']) | |
| 75 | |
| 76 if api.chromium.c.TARGET_PLATFORM == 'android': | |
| 77 api.chromium_android.detect_and_setup_devices() | |
| 78 | |
| 79 with api.step.defer_results(): | |
| 80 _RunUnittests(api) | |
| 81 _RunApptests(api) | |
| 82 | |
| 83 | |
| 84 def GenTests(api): | |
| 85 for test in api.chromium.gen_tests_for_builders(BUILDERS): | |
| 86 yield test | |
| OLD | NEW |