Chromium Code Reviews| 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 # Recipe for building and running tests for WebRTC stand-alone. | 5 # Recipe for building and running tests for WebRTC stand-alone. |
| 6 | 6 |
| 7 DEPS = [ | 7 DEPS = [ |
| 8 'archive', | 8 'archive', |
| 9 'depot_tools/bot_update', | 9 'depot_tools/bot_update', |
| 10 'chromium', | 10 'chromium', |
| 11 'chromium_android', | 11 'chromium_android', |
| 12 'commit_position', | |
| 12 'depot_tools/gclient', | 13 'depot_tools/gclient', |
| 14 'gsutil', | |
| 13 'ios', | 15 'ios', |
| 14 'recipe_engine/path', | 16 'recipe_engine/path', |
| 15 'recipe_engine/platform', | 17 'recipe_engine/platform', |
| 16 'recipe_engine/properties', | 18 'recipe_engine/properties', |
| 17 'recipe_engine/step', | 19 'recipe_engine/step', |
| 18 'depot_tools/tryserver', | 20 'depot_tools/tryserver', |
| 19 'webrtc', | 21 'webrtc', |
| 22 'zip', | |
| 20 ] | 23 ] |
| 21 | 24 |
| 22 | 25 |
| 23 def RunSteps(api): | 26 def RunSteps(api): |
| 24 webrtc = api.webrtc | 27 webrtc = api.webrtc |
| 25 webrtc.apply_bot_config(webrtc.BUILDERS, webrtc.RECIPE_CONFIGS) | 28 webrtc.apply_bot_config(webrtc.BUILDERS, webrtc.RECIPE_CONFIGS) |
| 26 | 29 |
| 27 if api.platform.is_mac: | 30 if api.platform.is_mac: |
| 28 api.ios.host_info() | 31 api.ios.host_info() |
| 29 webrtc.checkout() | 32 webrtc.checkout() |
| 30 webrtc.cleanup() | 33 webrtc.cleanup() |
| 31 if webrtc.should_build: | 34 if webrtc.should_build: |
| 32 api.chromium.ensure_goma() | 35 api.chromium.ensure_goma() |
| 33 api.chromium.runhooks() | 36 api.chromium.runhooks() |
| 34 webrtc.check_swarming_version() | 37 webrtc.check_swarming_version() |
| 35 | 38 |
| 36 if webrtc.should_build: | 39 if webrtc.should_build: |
| 37 webrtc.compile() | 40 webrtc.compile() |
| 38 | 41 |
| 39 if api.chromium.c.gyp_env.GYP_DEFINES.get('syzyasan', 0) == 1: | 42 if api.chromium.c.gyp_env.GYP_DEFINES.get('syzyasan', 0) == 1: |
| 40 api.chromium.apply_syzyasan() | 43 api.chromium.apply_syzyasan() |
| 41 | 44 |
| 42 if webrtc.should_upload_build: | 45 if webrtc.should_upload_build: |
| 43 webrtc.package_build() | 46 webrtc.package_build() |
| 44 if webrtc.should_download_build: | 47 if webrtc.should_download_build: |
| 45 webrtc.extract_build() | 48 webrtc.extract_build() |
| 46 | 49 |
| 50 if api.properties['buildername'] in ('Android32 Builder', | |
|
kjellander_chromium
2016/09/18 17:33:23
I'd like to keep builder-details like this closer
ehmaldonado_chromium
2016/09/19 06:50:37
Done.
| |
| 51 'Android32 Builder (dbg)' | |
| 52 'Android64 Builder', | |
| 53 'Android64 Builder (dbg)'): | |
| 54 apk_root = api.chromium.c.build_dir.join(api.chromium.c.build_config_fs, | |
| 55 'apks') | |
| 56 zip_path = api.path['slave_build'].join('AppRTCDemo_apk.zip') | |
| 57 pkg = api.zip.make_package(apk_root, zip_path) | |
| 58 pkg.add_file(apk_root.join('AppRTCDemo.apk')) | |
| 59 pkg.zip('AppRTCDemo zip archive') | |
| 60 | |
| 61 destination = '%s/AppRTCDemo_apk_%s.zip' % ( | |
| 62 api.properties['buildername'].replace(' ', '_'), | |
| 63 api.commit_position.parse_revision(webrtc.revision_cp)) | |
|
kjellander_chromium
2016/09/18 17:33:24
Instead of this, you can use self.revision_cp if y
ehmaldonado_chromium
2016/09/19 06:50:37
Done.
| |
| 64 api.gsutil.upload(zip_path, 'chromium-webrtc', destination, | |
|
kjellander_chromium
2016/09/18 17:33:24
Then we could re-use the existing package_build me
ehmaldonado_chromium
2016/09/19 06:50:37
Moved to the package_build method.
I didn't re-us
kjellander_chromium
2016/09/19 12:14:24
I see. Looks much better now!
| |
| 65 args=['-a', 'public-read'], unauthenticated_url=True) | |
| 66 | |
| 47 if webrtc.should_test: | 67 if webrtc.should_test: |
| 48 webrtc.runtests() | 68 webrtc.runtests() |
| 49 | 69 |
| 50 webrtc.maybe_trigger() | 70 webrtc.maybe_trigger() |
| 51 | 71 |
| 52 | 72 |
| 53 def _sanitize_nonalpha(text): | 73 def _sanitize_nonalpha(text): |
| 54 return ''.join(c if c.isalnum() else '_' for c in text.lower()) | 74 return ''.join(c if c.isalnum() else '_' for c in text.lower()) |
| 55 | 75 |
| 56 | 76 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 118 yield generate_builder(mastername, 'Android32 Builder', revision=None, | 138 yield generate_builder(mastername, 'Android32 Builder', revision=None, |
| 119 suffix='_forced') | 139 suffix='_forced') |
| 120 | 140 |
| 121 buildername = 'Android32 Tests (L Nexus5)' | 141 buildername = 'Android32 Tests (L Nexus5)' |
| 122 yield generate_builder(mastername, buildername, revision=None, | 142 yield generate_builder(mastername, buildername, revision=None, |
| 123 parent_got_revision='12345', suffix='_forced') | 143 parent_got_revision='12345', suffix='_forced') |
| 124 yield generate_builder(mastername, buildername, revision=None, | 144 yield generate_builder(mastername, buildername, revision=None, |
| 125 suffix='_forced_invalid') | 145 suffix='_forced_invalid') |
| 126 yield generate_builder(mastername, buildername, revision='12345', | 146 yield generate_builder(mastername, buildername, revision='12345', |
| 127 failing_test='tools_unittests', suffix='_failing_test') | 147 failing_test='tools_unittests', suffix='_failing_test') |
| OLD | NEW |