OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 = ['android', 'properties', 'rietveld'] | 5 DEPS = ['android', 'properties', 'rietveld'] |
6 | 6 |
7 def GenSteps(api): | 7 def GenSteps(api): |
8 droid = api.android | 8 droid = api.android |
9 droid.set_config('AOSP') | 9 droid.set_config('AOSP') |
10 yield droid.chromium_with_trimmed_deps() | 10 yield droid.chromium_with_trimmed_deps() |
11 yield droid.lastchange_steps() | 11 yield droid.lastchange_steps() |
12 | 12 |
13 if 'issue' in api.properties: | 13 if 'issue' in api.properties: |
14 yield api.rietveld.apply_issue(api.rietveld.calculate_issue_root()) | 14 yield api.rietveld.apply_issue(api.rietveld.calculate_issue_root()) |
15 | 15 |
16 yield droid.repo_init_steps() | 16 yield droid.repo_init_steps() |
17 yield droid.generate_local_manifest_step() | 17 yield droid.generate_local_manifest_step() |
18 yield droid.repo_sync_steps() | 18 yield droid.repo_sync_steps() |
19 | 19 |
20 yield droid.symlink_chromium_into_android_tree_step() | 20 yield droid.symlink_chromium_into_android_tree_step() |
21 yield droid.gyp_webview_step() | 21 yield droid.gyp_webview_step() |
22 | 22 |
23 # TODO(android): use api.chromium.compile for this | 23 # TODO(android): use api.chromium.compile for this |
24 yield droid.compile_step( | 24 yield droid.compile_step( |
25 build_tool='make-android', | 25 build_tool='make-android', |
26 targets=['libwebviewchromium', 'android_webview_java'], | 26 targets=['libwebviewchromium', 'android_webview_java'], |
27 use_goma=True) | 27 use_goma=True) |
28 | 28 |
29 def GenTests(api): | 29 def GenTests(api): |
30 def _common_step_mocks(): | |
31 return { | |
32 'calculate trimmed deps': { | |
33 'json': { | |
34 'output': { | |
35 'blacklist': { | |
36 'src/blacklist/project/1': None, | |
37 'src/blacklist/project/2': None, | |
38 } | |
39 } | |
40 } | |
41 } | |
42 } | |
43 | |
44 yield 'basic', { | 30 yield 'basic', { |
45 'properties': api.properties_scheduled(), | 31 'properties': api.properties.scheduled(), |
46 'step_mocks': _common_step_mocks(), | |
47 } | 32 } |
48 | 33 |
49 yield 'uses_android_repo', { | 34 yield 'uses_android_repo', { |
50 'properties': api.properties_scheduled(), | 35 'properties': api.properties.scheduled(), |
51 'step_mocks': _common_step_mocks(), | |
52 'mock' : { | 36 'mock' : { |
53 'path': { | 37 'path': { |
54 'exists': [ | 38 'exists': [ |
55 '[SLAVE_BUILD_ROOT]/android-src/.repo/repo/repo', | 39 '[SLAVE_BUILD_ROOT]/android-src/.repo/repo/repo', |
56 ] | 40 ] |
57 } | 41 } |
58 } | 42 } |
59 } | 43 } |
60 | 44 |
61 yield 'doesnt_sync_if_android_present', { | 45 yield 'doesnt_sync_if_android_present', { |
62 'properties': api.properties_scheduled(), | 46 'properties': api.properties.scheduled(), |
63 'step_mocks': _common_step_mocks(), | |
64 'mock' : { | 47 'mock' : { |
65 'path': { | 48 'path': { |
66 'exists': [ | 49 'exists': [ |
67 '[SLAVE_BUILD_ROOT]/android-src', | 50 '[SLAVE_BUILD_ROOT]/android-src', |
68 ] | 51 ] |
69 } | 52 } |
70 } | 53 } |
71 } | 54 } |
72 | 55 |
73 yield 'does_delete_stale_chromium', { | 56 yield 'does_delete_stale_chromium', { |
74 'properties': api.properties_scheduled(), | 57 'properties': api.properties.scheduled(), |
75 'step_mocks': _common_step_mocks(), | |
76 'mock' : { | 58 'mock' : { |
77 'path': { | 59 'path': { |
78 'exists': [ | 60 'exists': [ |
79 '[SLAVE_BUILD_ROOT]/android-src/external/chromium_org', | 61 '[SLAVE_BUILD_ROOT]/android-src/external/chromium_org', |
80 ] | 62 ] |
81 } | 63 } |
82 } | 64 } |
83 } | 65 } |
84 | 66 |
85 yield 'uses_goma_test', { | 67 yield 'uses_goma_test', { |
86 'properties': api.properties_scheduled(), | 68 'properties': api.properties.scheduled(), |
87 'step_mocks': _common_step_mocks(), | |
88 'mock' : { | 69 'mock' : { |
89 'path': { | 70 'path': { |
90 'exists': [ | 71 'exists': [ |
91 '[BUILD_ROOT]/goma' | 72 '[BUILD_ROOT]/goma' |
92 ] | 73 ] |
93 } | 74 } |
94 } | 75 } |
95 } | 76 } |
96 | 77 |
97 yield 'works_if_revision_not_present', { | 78 yield 'works_if_revision_not_present', { |
98 'properties': api.properties_generic(), | 79 'properties': api.properties.generic(), |
99 'step_mocks': _common_step_mocks(), | |
100 } | 80 } |
101 | 81 |
102 yield 'trybot', { | 82 yield 'trybot', { |
103 'properties': api.properties_tryserver(), | 83 'properties': api.properties.tryserver(), |
104 'step_mocks': _common_step_mocks(), | |
105 } | 84 } |
OLD | NEW |