| 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 'chromite', | 6 'chromite', |
| 7 'gitiles', | 7 'gitiles', |
| 8 'recipe_engine/properties', | 8 'recipe_engine/properties', |
| 9 ] | 9 ] |
| 10 | 10 |
| 11 | 11 |
| 12 # Map master name to 'chromite' configuration name. | 12 # Map master name to 'chromite' configuration name. |
| 13 _MASTER_CONFIG_MAP = { | 13 _MASTER_CONFIG_MAP = { |
| 14 'chromiumos': { | 14 'chromiumos': { |
| 15 'master_config': 'master_chromiumos', | 15 'master_config': 'master_chromiumos', |
| 16 'variants': { | 16 'build_type_configs': { |
| 17 'paladin': ['chromiumos_paladin'], | 17 'paladin': 'chromiumos_paladin', |
| 18 }, | 18 }, |
| 19 }, | 19 }, |
| 20 'chromiumos.chromium': { | 20 'chromiumos.chromium': { |
| 21 'master_config': 'master_chromiumos_chromium', | 21 'master_config': 'master_chromiumos_chromium', |
| 22 }, | 22 }, |
| 23 | 23 |
| 24 # Fake waterfall for Coverage | 24 # Fake master name for Coverage. |
| 25 'chromiumos.coverage': { | 25 'chromiumos.coverage': { |
| 26 'master_config': 'master_chromiumos', | 26 'master_config': 'chromiumos_coverage', |
| 27 'build_type_configs': { |
| 28 'foo': 'bar', |
| 29 }, |
| 30 # TODO(dnj): Remove this entry once we deprecate variants. |
| 27 'variants': { | 31 'variants': { |
| 28 'test': ['chromiumos_coverage_test'], | 32 'coverage': ['coverage_variant'], |
| 29 }, | 33 }, |
| 30 }, | 34 }, |
| 31 } | 35 } |
| 32 | 36 |
| 33 def RunSteps(api): | 37 def RunSteps(api): |
| 34 # Load the appropriate configuration based on the master. | 38 # Load the appropriate configuration based on the master. |
| 35 api.chromite.configure( | 39 api.chromite.configure( |
| 36 api.properties, | 40 api.properties, |
| 37 _MASTER_CONFIG_MAP) | 41 _MASTER_CONFIG_MAP) |
| 38 | 42 |
| 39 # Run 'cbuildbot' common recipe. | 43 # Run 'cbuildbot' common recipe. |
| 40 api.chromite.run_cbuildbot() | 44 api.chromite.run_cbuildbot() |
| 41 | 45 |
| 46 |
| 42 def GenTests(api): | 47 def GenTests(api): |
| 43 # | 48 # |
| 44 # master.chromiumos.chromium | 49 # master.chromiumos.chromium |
| 45 # | 50 # |
| 46 | 51 |
| 47 # Test a standard CrOS build triggered by a Chromium commit. | 52 # Test a standard CrOS build triggered by a Chromium commit. |
| 48 yield ( | 53 yield ( |
| 49 api.test('chromiumos_chromium_builder') | 54 api.test('chromiumos_chromium_builder') |
| 50 + api.properties( | 55 + api.properties( |
| 51 mastername='chromiumos.chromium', | 56 mastername='chromiumos.chromium', |
| (...skipping 17 matching lines...) Expand all Loading... |
| 69 + api.properties( | 74 + api.properties( |
| 70 mastername='chromiumos', | 75 mastername='chromiumos', |
| 71 buildername='Test', | 76 buildername='Test', |
| 72 slavename='test', | 77 slavename='test', |
| 73 buildnumber='12345', | 78 buildnumber='12345', |
| 74 repository='https://chromium.googlesource.com/chromiumos/' | 79 repository='https://chromium.googlesource.com/chromiumos/' |
| 75 'manifest-versions', | 80 'manifest-versions', |
| 76 branch='master', | 81 branch='master', |
| 77 revision=api.gitiles.make_hash('test'), | 82 revision=api.gitiles.make_hash('test'), |
| 78 cbb_config='x86-generic-paladin', | 83 cbb_config='x86-generic-paladin', |
| 79 cbb_variant='paladin', | |
| 80 ) | 84 ) |
| 81 + api.step_data( | 85 + api.step_data( |
| 82 'Fetch manifest config', | 86 'Fetch manifest config', |
| 83 api.gitiles.make_commit_test_data( | 87 api.gitiles.make_commit_test_data( |
| 84 'test', | 88 'test', |
| 85 '\n'.join([ | 89 '\n'.join([ |
| 86 'Commit message!', | 90 'Commit message!', |
| 87 'Automatic: Start master-paladin master 6952.0.0-rc4', | 91 'Automatic: Start master-paladin master 6952.0.0-rc4', |
| 88 'CrOS-Build-Id: 1337', | 92 'CrOS-Build-Id: 1337', |
| 89 ]), | 93 ]), |
| 90 ), | 94 ), |
| 91 ) | 95 ) |
| 96 + api.chromite.add_chromite_config( |
| 97 'x86-generic-paladin', |
| 98 build_type='paladin', |
| 99 ) |
| 92 ) | 100 ) |
| 93 | 101 |
| 94 # Test a ChromiumOS Paladin build whose manifest is not parsable. | 102 # Test a ChromiumOS Paladin build whose manifest is not parsable. |
| 95 yield ( | 103 yield ( |
| 96 api.test('chromiumos_paladin_manifest_failure') | 104 api.test('chromiumos_paladin_manifest_failure') |
| 97 + api.properties( | 105 + api.properties( |
| 98 mastername='chromiumos', | 106 mastername='chromiumos', |
| 99 buildername='Test', | 107 buildername='Test', |
| 100 slavename='test', | 108 slavename='test', |
| 101 buildnumber='12345', | 109 buildnumber='12345', |
| 102 repository='https://chromium.googlesource.com/chromiumos/' | 110 repository='https://chromium.googlesource.com/chromiumos/' |
| 103 'manifest-versions', | 111 'manifest-versions', |
| 104 branch='master', | 112 branch='master', |
| 105 revision=api.gitiles.make_hash('test'), | 113 revision=api.gitiles.make_hash('test'), |
| 106 cbb_config='x86-generic-paladin', | 114 cbb_config='x86-generic-paladin', |
| 107 cbb_variant='paladin', | |
| 108 ) | 115 ) |
| 109 + api.step_data( | 116 + api.step_data( |
| 110 'Fetch manifest config', | 117 'Fetch manifest config', |
| 111 api.gitiles.make_commit_test_data( | 118 api.gitiles.make_commit_test_data( |
| 112 'test', | 119 'test', |
| 113 None | 120 None |
| 114 ) | 121 ) |
| 115 ) | 122 ) |
| 123 + api.chromite.add_chromite_config( |
| 124 'x86-generic-paladin', |
| 125 build_type='paladin', |
| 126 ) |
| 116 ) | 127 ) |
| 117 | 128 |
| 118 # | 129 # |
| 119 # [Coverage] | 130 # [Coverage] |
| 120 # | 131 # |
| 121 | 132 |
| 122 # Coverage builders for a bunch of options used in other repositories. | 133 # Coverage builders for a bunch of options used in other repositories. |
| 123 yield ( | 134 yield ( |
| 124 api.test('chromiumos_coverage') | 135 api.test('chromiumos_coverage') |
| 125 + api.properties( | 136 + api.properties( |
| 126 mastername='chromiumos.coverage', | 137 mastername='chromiumos.coverage', |
| 127 buildername='Test', | 138 buildername='Test', |
| 128 slavename='test', | 139 slavename='test', |
| 129 buildnumber=0, | 140 buildnumber=0, |
| 130 clobber=None, | 141 clobber=None, |
| 131 repository='https://chromium.googlesource.com/chromiumos/' | 142 repository='https://chromium.googlesource.com/chromiumos/' |
| 132 'chromite.git', | 143 'chromite.git', |
| 133 revision='fdea0dde664e229976ddb2224328da152fba15b1', | 144 revision='fdea0dde664e229976ddb2224328da152fba15b1', |
| 134 branch='master', | 145 branch='master', |
| 135 cbb_config='x86-generic-full', | 146 cbb_config='x86-generic-full', |
| 136 cbb_branch='factory-1412.B', | 147 cbb_branch='firmware-uboot_v2-1299.B', |
| 137 cbb_variant='test', | 148 config_repo='https://fake.googlesource.com/myconfig/repo.git', |
| 149 cbb_debug=True, |
| 150 cbb_disable_branch=True, |
| 151 ) |
| 152 ) |
| 153 |
| 154 # Coverage builders for a bunch of options used in other repositories. |
| 155 # This one uses a variant system. |
| 156 # |
| 157 # TODO(dnj): Remove this once variant support is deleted. |
| 158 yield ( |
| 159 api.test('chromiumos_coverage_variant') |
| 160 + api.properties( |
| 161 mastername='chromiumos.coverage', |
| 162 buildername='Test', |
| 163 slavename='test', |
| 164 buildnumber=0, |
| 165 clobber=None, |
| 166 repository='https://chromium.googlesource.com/chromiumos/' |
| 167 'chromite.git', |
| 168 revision='fdea0dde664e229976ddb2224328da152fba15b1', |
| 169 branch='master', |
| 170 cbb_variant='coverage', |
| 171 cbb_config='x86-generic-full', |
| 172 cbb_branch='firmware-uboot_v2-1299.B', |
| 138 cbb_debug=True, | 173 cbb_debug=True, |
| 139 cbb_disable_branch=True, | 174 cbb_disable_branch=True, |
| 140 config_repo='https://fake.googlesource.com/myconfig/repo.git', | 175 config_repo='https://fake.googlesource.com/myconfig/repo.git', |
| 141 ) | 176 ) |
| 142 ) | 177 ) |
| OLD | NEW |