| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 from recipe_engine import recipe_api | 5 from recipe_engine import recipe_api |
| 6 from recipe_engine.recipe_api import Property | 6 from recipe_engine.recipe_api import Property |
| 7 from recipe_engine.types import freeze | 7 from recipe_engine.types import freeze |
| 8 | 8 |
| 9 DEPS = [ | 9 DEPS = [ |
| 10 'blimp', |
| 10 'chromium', | 11 'chromium', |
| 11 'chromium_android', | 12 'chromium_android', |
| 12 'chromium_swarming', | |
| 13 'chromium_tests', | |
| 14 'depot_tools/bot_update', | 13 'depot_tools/bot_update', |
| 15 'depot_tools/gclient', | 14 'depot_tools/gclient', |
| 16 'recipe_engine/json', | |
| 17 'recipe_engine/path', | 15 'recipe_engine/path', |
| 18 'recipe_engine/platform', | |
| 19 'recipe_engine/properties', | 16 'recipe_engine/properties', |
| 20 'recipe_engine/python', | |
| 21 'recipe_engine/step', | |
| 22 'swarming', | |
| 23 'test_results', | |
| 24 'test_utils', | |
| 25 ] | 17 ] |
| 26 | 18 |
| 27 BUILDERS = freeze({ | 19 BUILDERS = freeze({ |
| 28 'chromium.fyi': { | 20 'chromium.fyi': { |
| 29 'Blimp Client Engine Integration': { | 21 'Blimp Client Engine Integration': { |
| 30 'chromium_config': 'android', | 22 'chromium_config': 'android', |
| 31 'config': 'main_builder', | 23 'config': 'main_builder', |
| 32 'gclient_apply_config': 'android', | 24 'gclient_apply_config': 'android', |
| 33 'gclient_config': 'chromium', | 25 'gclient_config': 'chromium', |
| 34 'target': 'Debug', | 26 'target': 'Debug', |
| (...skipping 10 matching lines...) Expand all Loading... |
| 45 api.chromium.set_config('chromium') | 37 api.chromium.set_config('chromium') |
| 46 api.chromium_android.configure_from_properties( | 38 api.chromium_android.configure_from_properties( |
| 47 builder['config'], | 39 builder['config'], |
| 48 REPO_NAME='src', | 40 REPO_NAME='src', |
| 49 REPO_URL=REPO_URL, | 41 REPO_URL=REPO_URL, |
| 50 INTERNAL=False, | 42 INTERNAL=False, |
| 51 BUILD_CONFIG=builder['target']) | 43 BUILD_CONFIG=builder['target']) |
| 52 | 44 |
| 53 api.gclient.set_config(builder['gclient_config']) | 45 api.gclient.set_config(builder['gclient_config']) |
| 54 api.gclient.apply_config(builder['gclient_apply_config']) | 46 api.gclient.apply_config(builder['gclient_apply_config']) |
| 47 api.blimp.set_config('base_config') |
| 55 api.bot_update.ensure_checkout() | 48 api.bot_update.ensure_checkout() |
| 56 api.chromium.ensure_goma() | 49 api.chromium.ensure_goma() |
| 57 api.chromium_android.clean_local_files() | 50 api.chromium_android.clean_local_files() |
| 58 api.chromium.runhooks() | 51 api.chromium.runhooks() |
| 59 | 52 |
| 60 android_build = api.path['checkout'].join('out-android') | 53 android_build = api.path['checkout'].join('out-android') |
| 61 linux_build = api.path['checkout'].join('out-linux') | 54 linux_build = api.path['checkout'].join('out-linux') |
| 55 android_debug_dir = android_build.join(api.chromium.c.build_config_fs) |
| 56 linux_debug_dir = linux_build.join(api.chromium.c.build_config_fs) |
| 62 | 57 |
| 63 api.chromium.run_mb(mastername=mastername, | 58 api.chromium.run_mb(mastername=mastername, |
| 64 buildername=buildername, | 59 buildername=buildername, |
| 65 build_dir=linux_build.join( | 60 build_dir=linux_debug_dir, |
| 66 api.chromium.c.build_config_fs), | |
| 67 phase='engine') | 61 phase='engine') |
| 68 api.chromium.compile(targets=['blimp'], | 62 api.chromium.compile(targets=['blimp'], |
| 69 out_dir=linux_build) | 63 out_dir=linux_build) |
| 70 api.chromium.run_mb(mastername=mastername, | 64 api.chromium.run_mb(mastername=mastername, |
| 71 buildername=buildername, | 65 buildername=buildername, |
| 72 build_dir=android_build.join( | 66 build_dir=android_debug_dir, |
| 73 api.chromium.c.build_config_fs), | |
| 74 phase='client') | 67 phase='client') |
| 75 api.chromium.compile(targets=['blimp', 'chrome_public_apk'], | 68 api.chromium.compile(targets=['blimp', 'chrome_public_apk'], |
| 76 out_dir=android_build) | 69 out_dir=android_build) |
| 77 | 70 |
| 71 apk_path = android_debug_dir.join('apks', 'ChromePublic.apk') |
| 72 |
| 73 with api.blimp.engine_forwarder(output_linux_dir=linux_debug_dir): |
| 74 api.blimp.load_client(output_linux_dir=linux_debug_dir, |
| 75 apk_path=apk_path) |
| 78 | 76 |
| 79 def GenTests(api): | 77 def GenTests(api): |
| 80 sanitize = lambda s: ''.join(c if c.isalnum() else '_' for c in s) | 78 sanitize = lambda s: ''.join(c if c.isalnum() else '_' for c in s) |
| 81 | 79 |
| 82 yield ( | 80 yield ( |
| 83 api.test('%s_test_pass' % sanitize('Blimp Client Engine Integration')) + | 81 api.test('%s_test_pass' % sanitize('Blimp Client Engine Integration')) + |
| 84 api.properties.generic( | 82 api.properties.generic( |
| 85 buildername='Blimp Client Engine Integration', | 83 buildername='Blimp Client Engine Integration', |
| 86 mastername='chromium.fyi') | 84 mastername='chromium.fyi') |
| 87 ) | 85 ) |
| OLD | NEW |