Chromium Code Reviews| 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_swarming', |
| 13 'chromium_tests', | 14 'chromium_tests', |
| 14 'depot_tools/bot_update', | 15 'depot_tools/bot_update', |
| 15 'depot_tools/gclient', | 16 'depot_tools/gclient', |
| 16 'recipe_engine/json', | 17 'recipe_engine/json', |
| 17 'recipe_engine/path', | 18 'recipe_engine/path', |
| 18 'recipe_engine/platform', | 19 'recipe_engine/platform', |
| 19 'recipe_engine/properties', | 20 'recipe_engine/properties', |
| 20 'recipe_engine/python', | 21 'recipe_engine/python', |
| 21 'recipe_engine/step', | 22 'recipe_engine/step', |
| 22 'swarming', | 23 'swarming', |
| 23 'test_results', | 24 'test_results', |
| 24 'test_utils', | 25 'test_utils', |
|
mikecase (-- gone --)
2016/10/15 00:05:37
Most of these DEPS you are not using. Delete all t
shenghuazhang
2016/10/17 23:22:07
Done.
| |
| 25 ] | 26 ] |
| 26 | 27 |
| 27 BUILDERS = freeze({ | 28 BUILDERS = freeze({ |
| 28 'chromium.fyi': { | 29 'chromium.fyi': { |
| 29 'Blimp Client Engine Integration': { | 30 'Blimp Client Engine Integration': { |
| 30 'chromium_config': 'android', | 31 'chromium_config': 'android', |
| 31 'config': 'main_builder', | 32 'config': 'main_builder', |
| 32 'gclient_apply_config': 'android', | 33 'gclient_apply_config': 'android', |
| 33 'gclient_config': 'chromium', | 34 'gclient_config': 'chromium', |
| 34 'target': 'Debug', | 35 'target': 'Debug', |
| 35 }, | 36 }, |
| 36 }, | 37 }, |
| 37 }) | 38 }) |
| 38 | 39 |
| 39 REPO_URL = 'https://chromium.googlesource.com/chromium/src.git' | 40 REPO_URL = 'https://chromium.googlesource.com/chromium/src.git' |
| 40 | 41 |
| 41 def RunSteps(api): | 42 def RunSteps(api): |
| 42 android_build = api.path['slave_build'].join('src', 'out-android', 'Debug') | |
| 43 linux_build = api.path['slave_build'].join('src', 'out-linux', 'Debug') | |
| 44 mastername = api.properties.get('mastername') | 43 mastername = api.properties.get('mastername') |
| 45 buildername = api.properties.get('buildername') | 44 buildername = api.properties.get('buildername') |
| 46 builder = BUILDERS[mastername][buildername] | 45 builder = BUILDERS[mastername][buildername] |
| 46 api.chromium.set_config('chromium') | |
| 47 api.chromium_android.configure_from_properties( | 47 api.chromium_android.configure_from_properties( |
| 48 builder['config'], | 48 builder['config'], |
| 49 REPO_NAME='src', | 49 REPO_NAME='src', |
| 50 REPO_URL=REPO_URL, | 50 REPO_URL=REPO_URL, |
| 51 INTERNAL=False, | 51 INTERNAL=False, |
| 52 BUILD_CONFIG=builder['target']) | 52 BUILD_CONFIG=builder['target']) |
| 53 | 53 |
| 54 api.chromium.set_config('chromium') | |
| 55 api.gclient.set_config(builder['gclient_config']) | 54 api.gclient.set_config(builder['gclient_config']) |
| 56 api.gclient.apply_config(builder['gclient_apply_config']) | 55 api.gclient.apply_config(builder['gclient_apply_config']) |
| 56 api.blimp.set_config('base_config') | |
| 57 api.bot_update.ensure_checkout() | 57 api.bot_update.ensure_checkout() |
| 58 api.chromium.ensure_goma() | 58 api.chromium.ensure_goma() |
| 59 api.chromium_android.clean_local_files() | 59 api.chromium_android.clean_local_files() |
| 60 api.chromium.runhooks() | 60 api.chromium.runhooks() |
| 61 | 61 |
| 62 android_build = api.path['checkout'].join('out-android') | |
| 63 linux_build = api.path['checkout'].join('out-linux') | |
| 64 android_debug_dir = android_build.join( | |
| 65 api.chromium.c.build_config_fs) | |
| 66 linux_debug_dir = linux_build.join( | |
| 67 api.chromium.c.build_config_fs) | |
| 68 | |
| 62 api.chromium.run_mb(mastername=mastername, | 69 api.chromium.run_mb(mastername=mastername, |
| 63 buildername=buildername, | 70 buildername=buildername, |
| 64 build_dir=linux_build, | 71 build_dir=linux_debug_dir, |
| 65 phase='engine') | 72 phase='engine') |
| 66 api.chromium.compile(targets=['blimp'], | 73 api.chromium.compile(targets=['blimp'], |
| 67 out_dir=linux_build) | 74 out_dir=linux_build) |
| 68 api.chromium.run_mb(mastername=mastername, | 75 api.chromium.run_mb(mastername=mastername, |
| 69 buildername=buildername, | 76 buildername=buildername, |
| 70 build_dir=android_build, | 77 build_dir=android_debug_dir, |
| 71 phase='client') | 78 phase='client') |
| 72 api.chromium.compile(targets=['blimp', 'chrome_public_apk'], | 79 api.chromium.compile(targets=['blimp', 'chrome_public_apk'], |
| 73 out_dir=android_build) | 80 out_dir=android_build) |
| 74 | 81 |
| 82 api.blimp.run_engine_forwarder(output_linux_dir=linux_debug_dir) | |
| 83 apk_path = android_debug_dir.join('apks', 'ChromePublic.apk') | |
| 84 api.blimp.load_client(output_linux_dir=linux_debug_dir, | |
| 85 apk_path=apk_path) | |
| 86 api.blimp.stop_engine_forwarder(output_linux_dir=linux_debug_dir) | |
| 75 | 87 |
| 76 def GenTests(api): | 88 def GenTests(api): |
| 77 sanitize = lambda s: ''.join(c if c.isalnum() else '_' for c in s) | 89 sanitize = lambda s: ''.join(c if c.isalnum() else '_' for c in s) |
| 78 | 90 |
| 79 yield ( | 91 yield ( |
| 80 api.test('%s_test_pass' % sanitize('Blimp Android Tester')) + | 92 api.test('%s_test_pass' % sanitize('Blimp Client Engine Integration')) + |
| 81 api.properties.generic( | 93 api.properties.generic( |
| 82 buildername='Blimp Client Engine Integration', | 94 buildername='Blimp Client Engine Integration', |
| 83 mastername='chromium.fyi') | 95 mastername='chromium.fyi') |
| 84 ) | 96 ) |
| OLD | NEW |