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 from common import cros_chromite | 5 from common import cros_chromite |
6 | 6 |
7 DEPS = [ | 7 DEPS = [ |
8 'chromite', | 8 'chromite', |
9 'gitiles', | 9 'gitiles', |
10 'properties', | 10 'properties', |
(...skipping 21 matching lines...) Expand all Loading... |
32 "--remote-trybot", | 32 "--remote-trybot", |
33 "--remote-version=4" | 33 "--remote-version=4" |
34 ] | 34 ] |
35 } | 35 } |
36 """ | 36 """ |
37 | 37 |
38 | 38 |
39 def RunSteps(api): | 39 def RunSteps(api): |
40 # The 'cbuildbot' config name to build is the name of the builder. | 40 # The 'cbuildbot' config name to build is the name of the builder. |
41 cbb_config_name = api.properties.get('buildername') | 41 cbb_config_name = api.properties.get('buildername') |
| 42 |
42 cbb = cros_chromite.Get() | 43 cbb = cros_chromite.Get() |
43 cbb_config = cbb.get(cbb_config_name) | 44 cbb_config = cbb.get(cbb_config_name) |
44 | 45 |
45 # Apply our generic configuration. | 46 # Apply our generic configuration. |
46 api.chromite.configure( | 47 api.chromite.configure( |
47 api.properties, | 48 api.properties, |
48 _MASTER_CONFIG_MAP) | 49 _MASTER_CONFIG_MAP) |
| 50 api.chromite.c.cbb.config = cbb_config_name |
49 | 51 |
50 # Determine our build directory name. | 52 # Determine our build directory name. |
51 namebase = cbb_config_name | 53 namebase = cbb_config_name |
52 if cbb_config: | 54 if cbb_config: |
53 namebase = 'internal' if cbb_config.get('internal') else 'external' | 55 namebase = 'internal' if cbb_config.get('internal') else 'external' |
54 api.chromite.c.cbb.builddir = '%s_master' % (namebase,) | 56 api.chromite.c.cbb.builddir = '%s_master' % (namebase,) |
55 | 57 |
56 # Run our 'cbuildbot'. | 58 # Run our 'cbuildbot'. |
57 api.chromite.run_cbuildbot( | 59 api.chromite.run_cbuildbot(tryjob=True) |
58 cbb_config_name, | |
59 tryjob=True) | |
60 | 60 |
61 | 61 |
62 def GenTests(api): | 62 def GenTests(api): |
63 # Test a CrOS tryjob. | 63 # Test a CrOS tryjob. |
64 yield ( | 64 yield ( |
65 api.test('basic') | 65 api.test('basic') |
66 + api.properties( | 66 + api.properties( |
67 mastername='chromiumos.tryserver', | 67 mastername='chromiumos.tryserver', |
68 buildername='x86-generic-full', | 68 buildername='x86-generic-full', |
69 slavename='test', | 69 slavename='test', |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 + api.step_data( | 126 + api.step_data( |
127 'Fetch tryjob commit', | 127 'Fetch tryjob commit', |
128 api.gitiles.make_commit_test_data( | 128 api.gitiles.make_commit_test_data( |
129 'test', | 129 'test', |
130 '\n'.join([ | 130 '\n'.join([ |
131 'Commit message!', | 131 'Commit message!', |
132 ]), | 132 ]), |
133 ), | 133 ), |
134 ) | 134 ) |
135 ) | 135 ) |
OLD | NEW |