| 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 = [ | 5 DEPS = [ |
| 6 'chromium_android', | 6 'chromium_android', |
| 7 'properties', | 7 'properties', |
| 8 'json', |
| 8 ] | 9 ] |
| 9 | 10 |
| 10 def GenSteps(api): | 11 def GenSteps(api): |
| 11 droid = api.chromium_android | 12 droid = api.chromium_android |
| 12 internal = api.properties.get('internal') | 13 internal = api.properties.get('internal') |
| 13 | 14 |
| 14 yield droid.init_and_sync() | 15 yield droid.init_and_sync() |
| 15 yield droid.envsetup() | 16 yield droid.envsetup() |
| 16 yield droid.clean_local_files() | 17 yield droid.clean_local_files() |
| 17 if internal: | 18 if internal: |
| 18 yield droid.run_tree_truth() | 19 yield droid.run_tree_truth() |
| 19 yield droid.runhooks() | 20 yield droid.runhooks() |
| 20 yield droid.compile() | 21 yield droid.compile() |
| 21 | 22 |
| 22 if droid.c.run_findbugs: | 23 if droid.c.run_findbugs: |
| 23 yield droid.findbugs() | 24 yield droid.findbugs() |
| 24 if droid.c.run_lint: | 25 if droid.c.run_lint: |
| 25 yield droid.lint() | 26 yield droid.lint() |
| 26 if droid.c.run_checkdeps: | 27 if droid.c.run_checkdeps: |
| 27 yield droid.checkdeps() | 28 yield droid.checkdeps() |
| 28 | 29 |
| 29 def GenTests(api): | 30 def GenTests(api): |
| 30 bot_ids = ['main_builder', 'component_builder', 'clang_builder', | 31 bot_ids = ['main_builder', 'component_builder', 'clang_builder', |
| 31 'x86_builder', 'klp_builder', 'try_builder'] | 32 'x86_builder', 'klp_builder', 'try_builder'] |
| 32 def _common_step_mocks(): | |
| 33 return { | |
| 34 'Get AppManifestVars': { | |
| 35 'json': { | |
| 36 'output': { | |
| 37 'version_code': 10, | |
| 38 'version_name': 'some builder 1234', | |
| 39 'build_id': 3333, | |
| 40 'date_string': 6001 | |
| 41 } | |
| 42 } | |
| 43 }, | |
| 44 'envsetup': { | |
| 45 'json': { | |
| 46 'output': { | |
| 47 'PATH': './', | |
| 48 } | |
| 49 } | |
| 50 } | |
| 51 } | |
| 52 | 33 |
| 53 for bot_id in bot_ids: | 34 for bot_id in bot_ids: |
| 54 props = { | 35 props = api.Properties( |
| 55 'repo_name': 'src/repo', | 36 repo_name='src/repo', |
| 56 'repo_url': 'svn://svn.chromium.org/chrome/trunk/src', | 37 repo_url='svn://svn.chromium.org/chrome/trunk/src', |
| 57 'revision': '4f4b02f6b7fa20a3a25682c457bbc8ad589c8a00', | 38 revision='4f4b02f6b7fa20a3a25682c457bbc8ad589c8a00', |
| 58 'android_bot_id': bot_id, | 39 android_bot_id=bot_id, |
| 59 'buildername': 'builder_name', | 40 buildername='builder_name', |
| 60 'internal': True | 41 internal=True |
| 61 } | 42 ) |
| 62 if bot_id == 'try_builder': | 43 if bot_id == 'try_builder': |
| 63 props['revision'] = '' | 44 props += api.Properties(revision='') |
| 64 yield bot_id, { | 45 |
| 65 'properties': props, | 46 yield ( |
| 66 'step_mocks': _common_step_mocks() | 47 api.Test(bot_id) + |
| 67 } | 48 props + |
| 49 api.StepData( |
| 50 'Get AppManifestVars', |
| 51 api.json.output({ |
| 52 'version_code': 10, |
| 53 'version_name': 'some builder 1234', |
| 54 'build_id': 3333, |
| 55 'date_string': 6001 |
| 56 }) |
| 57 ) + |
| 58 api.StepData('envsetup', api.json.output({'PATH': './'})) |
| 59 ) |
| OLD | NEW |