Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Side by Side Diff: scripts/slave/recipe_modules/archive/example.py

Issue 2394163006: Reland: Make clusterfuzz_archive include llvm-symbolizer and sancov. (Closed)
Patch Set: add tests Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 DEPS = [ 5 DEPS = [
6 'archive', 6 'archive',
7 'recipe_engine/json', 7 'recipe_engine/json',
8 'recipe_engine/path', 8 'recipe_engine/path',
9 'recipe_engine/platform', 9 'recipe_engine/platform',
10 'recipe_engine/properties', 10 'recipe_engine/properties',
11 ] 11 ]
12 12
13 TEST_HASH_MAIN='5e3250aadda2b170692f8e762d43b7e8deadbeef' 13 TEST_HASH_MAIN='5e3250aadda2b170692f8e762d43b7e8deadbeef'
14 TEST_COMMIT_POSITON_MAIN='refs/heads/B1@{#123456}' 14 TEST_COMMIT_POSITON_MAIN='refs/heads/B1@{#123456}'
15 15
16 TEST_HASH_COMPONENT='deadbeefdda2b170692f8e762d43b7e8e7a96686' 16 TEST_HASH_COMPONENT='deadbeefdda2b170692f8e762d43b7e8e7a96686'
17 TEST_COMMIT_POSITON_COMPONENT='refs/heads/master@{#234}' 17 TEST_COMMIT_POSITON_COMPONENT='refs/heads/master@{#234}'
18 18
19 19
20 def RunSteps(api): 20 def RunSteps(api):
21 if 'build_archive_url' in api.properties: 21 if 'build_archive_url' in api.properties:
22 api.archive.zip_and_upload_build( 22 api.archive.zip_and_upload_build(
23 step_name='zip build', 23 step_name='zip build',
24 target=api.path['checkout'].join('/Release/out')) 24 target=api.path['checkout'].join('/Release/out'))
25 return 25 return
26
27 if 'no_llvm' not in api.properties:
28 llvm_bin_dir = api.path['checkout'].join('third_party', 'llvm-build',
29 'Release+Asserts', 'bin')
30 api.path.mock_add_paths(api.path.join(llvm_bin_dir, 'llvm-symbolizer'))
31 api.path.mock_add_paths(api.path.join(llvm_bin_dir, 'sancov'))
32
33 build_dir = api.path['slave_build'].join('src', 'out', 'Release')
34
35 if 'llvm_tools_in_build_dir' in api.properties:
36 api.path.mock_add_paths(api.path.join(build_dir, 'llvm-symbolizer'))
37 api.path.mock_add_paths(api.path.join(build_dir, 'sancov'))
38
26 api.archive.clusterfuzz_archive( 39 api.archive.clusterfuzz_archive(
27 build_dir=api.path['slave_build'].join('src', 'out', 'Release'), 40 build_dir=build_dir,
28 update_properties=api.properties.get('update_properties'), 41 update_properties=api.properties.get('update_properties'),
29 gs_bucket='chromium', 42 gs_bucket='chromium',
30 gs_acl=api.properties.get('gs_acl', ''), 43 gs_acl=api.properties.get('gs_acl', ''),
31 archive_prefix='chrome-asan', 44 archive_prefix='chrome-asan',
32 archive_subdir_suffix=api.properties.get('archive_subdir_suffix', ''), 45 archive_subdir_suffix=api.properties.get('archive_subdir_suffix', ''),
33 revision_dir=api.properties.get('revision_dir'), 46 revision_dir=api.properties.get('revision_dir'),
34 primary_project=api.properties.get('primary_project'), 47 primary_project=api.properties.get('primary_project'),
35 ) 48 )
36 49
37 50
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 api.platform('linux', 64) + 124 api.platform('linux', 64) +
112 api.properties( 125 api.properties(
113 update_properties=update_properties, 126 update_properties=update_properties,
114 revision_dir='x10', 127 revision_dir='x10',
115 primary_project='x10', 128 primary_project='x10',
116 ) + 129 ) +
117 api.override_step_data( 130 api.override_step_data(
118 'listdir build_dir', api.json.output(['chrome'])) 131 'listdir build_dir', api.json.output(['chrome']))
119 ) 132 )
120 133
134 update_properties = {
135 'got_revision': TEST_HASH_MAIN,
136 'got_revision_cp': TEST_COMMIT_POSITON_MAIN,
137 }
138 yield (
139 api.test('cf_archiving_no_llvm') +
140 api.platform('linux', 64) +
141 api.properties(
142 update_properties=update_properties,
143 no_llvm=True,
144 ) +
145 api.override_step_data(
146 'listdir build_dir', api.json.output(['chrome']))
147 )
148
149 update_properties = {
150 'got_revision': TEST_HASH_MAIN,
151 'got_revision_cp': TEST_COMMIT_POSITON_MAIN,
152 }
153 yield (
154 api.test('cf_archiving_llvm_tools_in_build_dir') +
155 api.platform('linux', 64) +
156 api.properties(
157 update_properties=update_properties,
158 llvm_tools_in_build_dir=True,
159 ) +
160 api.override_step_data(
161 'listdir build_dir', api.json.output(['chrome']))
162 )
163
121 yield( 164 yield(
122 api.test('zip_and_upload_custom_location') + 165 api.test('zip_and_upload_custom_location') +
123 api.platform('linux', 64) + 166 api.platform('linux', 64) +
124 api.properties( 167 api.properties(
125 build_archive_url='gs://dummy-bucket/Linux Release/full-build.zip') 168 build_archive_url='gs://dummy-bucket/Linux Release/full-build.zip')
126 ) 169 )
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698