OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 # Copyright (c) 2014 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2014 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 """Dartium buildbot steps | 7 """Dartium buildbot steps |
8 | 8 |
9 Archive dartium, content_shell, and chromedriver to the cloud storage bucket | 9 Archive dartium, content_shell, and chromedriver to the cloud storage bucket |
10 gs://dart-archive, and run tests, including the Dart layout tests. | 10 gs://dart-archive, and run tests, including the Dart layout tests. |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 with utils.ChangedWorkingDirectory(DART_PATH): | 83 with utils.ChangedWorkingDirectory(DART_PATH): |
84 dart_tools_utils = imp.load_source('dart_tools_utils', | 84 dart_tools_utils = imp.load_source('dart_tools_utils', |
85 os.path.join('tools', 'utils.py')) | 85 os.path.join('tools', 'utils.py')) |
86 dart_revision = dart_tools_utils.GetArchiveVersion() | 86 dart_revision = dart_tools_utils.GetArchiveVersion() |
87 | 87 |
88 version = '%s.0' % dart_revision | 88 version = '%s.0' % dart_revision |
89 info = upload_steps.BuildInfo(dart_revision, version) | 89 info = upload_steps.BuildInfo(dart_revision, version) |
90 | 90 |
91 result = 0 | 91 result = 0 |
92 | 92 |
93 # Archive to the revision bucket unless integration build | 93 # Archive to the revision bucket |
94 if info.channel != 'integration': | 94 result = upload_steps.ArchiveAndUpload(info, archive_latest=False) |
95 result = upload_steps.ArchiveAndUpload(info, archive_latest=False) | 95 # On dev/stable we archive to the latest bucket as well |
96 # On dev/stable we archive to the latest bucket as well | 96 if info.channel != 'be': |
97 if info.channel != 'be': | 97 result = (upload_steps.ArchiveAndUpload(info, archive_latest=True) |
98 result = (upload_steps.ArchiveAndUpload(info, archive_latest=True) | 98 or result) |
99 or result) | |
100 | 99 |
101 # Run layout tests | 100 # Run layout tests |
102 if info.mode == 'Release' or platform.system() != 'Darwin': | 101 if info.mode == 'Release' or platform.system() != 'Darwin': |
103 result = Test(info, 'drt', 'layout', 'unchecked') or result | 102 result = Test(info, 'drt', 'layout', 'unchecked') or result |
104 result = Test(info, 'drt', 'layout', 'checked') or result | 103 result = Test(info, 'drt', 'layout', 'checked') or result |
105 # Run dartium tests | 104 # Run dartium tests |
106 result = Test(info, 'dartium', 'core', 'unchecked') or result | 105 result = Test(info, 'dartium', 'core', 'unchecked') or result |
107 result = Test(info, 'dartium', 'core', 'checked') or result | 106 result = Test(info, 'dartium', 'core', 'checked') or result |
108 | 107 |
109 # Run ContentShell tests | 108 # Run ContentShell tests |
110 # NOTE: We don't run ContentShell tests on dartium-*-inc builders to keep | 109 # NOTE: We don't run ContentShell tests on dartium-*-inc builders to keep |
111 # cycle times down. | 110 # cycle times down. |
112 if not info.is_incremental: | 111 if not info.is_incremental: |
113 # If we run all checked tests on dartium, we restrict the number of | 112 # If we run all checked tests on dartium, we restrict the number of |
114 # unchecked tests on drt to DRT_FILTER | 113 # unchecked tests on drt to DRT_FILTER |
115 result = Test(info, 'drt', 'core', 'unchecked', | 114 result = Test(info, 'drt', 'core', 'unchecked', |
116 test_filter=DRT_FILTER) or result | 115 test_filter=DRT_FILTER) or result |
117 result = Test(info, 'drt', 'core', 'checked') or result | 116 result = Test(info, 'drt', 'core', 'checked') or result |
118 | 117 |
119 # On the 'be' channel, we only archive to the latest bucket if all tests were | 118 # On the 'be' channel, we only archive to the latest bucket if all tests were |
120 # successful. | 119 # successful. |
121 if result == 0 and info.channel == 'be': | 120 if result == 0 and info.channel == 'be': |
122 result = upload_steps.ArchiveAndUpload(info, archive_latest=True) or result | 121 result = upload_steps.ArchiveAndUpload(info, archive_latest=True) or result |
123 return result | 122 return result |
124 | 123 |
125 if __name__ == '__main__': | 124 if __name__ == '__main__': |
126 sys.exit(main()) | 125 sys.exit(main()) |
OLD | NEW |