OLD | NEW |
1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 # for details. All rights reserved. Use of this source code is governed by a | 2 # for details. All rights reserved. Use of this source code is governed by a |
3 # BSD-style license that can be found in the LICENSE file. | 3 # BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 """Top-level presubmit script for Dart. | 5 """Top-level presubmit script for Dart. |
6 | 6 |
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts | 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts |
8 for more details about the presubmit API built into gcl. | 8 for more details about the presubmit API built into gcl. |
9 """ | 9 """ |
10 | 10 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 'Fix these issues with:\n' | 91 'Fix these issues with:\n' |
92 '%s -w \\\n%s' % (prebuilt_dartfmt, ' \\\n'.join(unformatted_files)))] | 92 '%s -w \\\n%s' % (prebuilt_dartfmt, ' \\\n'.join(unformatted_files)))] |
93 | 93 |
94 return [] | 94 return [] |
95 | 95 |
96 def _CheckNewTests(input_api, output_api): | 96 def _CheckNewTests(input_api, output_api): |
97 testsDirectories = [ | 97 testsDirectories = [ |
98 # Dart 1 tests DDC tests | 98 # Dart 1 tests DDC tests |
99 # ================= ========================== | 99 # ================= ========================== |
100 ("tests/language/", "tests/language_2/"), | 100 ("tests/language/", "tests/language_2/"), |
101 ("tests/corelib/", "tests/corelib_2/"), | |
102 ("tests/lib/", "tests/lib_2/"), | 101 ("tests/lib/", "tests/lib_2/"), |
103 ("tests/html/", "tests/lib_2/html/"), | 102 ("tests/html/", "tests/lib_2/html/"), |
104 ] | 103 ] |
105 | 104 |
106 result = [] | 105 result = [] |
107 # Tuples of (new Dart 1 test path, expected DDC test path) | 106 # Tuples of (new Dart 1 test path, expected DDC test path) |
108 dart1TestsAdded = [] | 107 dart1TestsAdded = [] |
109 # Tuples of (original Dart test path, expected DDC test path) | 108 # Tuples of (original Dart test path, expected DDC test path) |
110 ddcTestsExists = [] | 109 ddcTestsExists = [] |
111 for f in input_api.AffectedFiles(): | 110 for f in input_api.AffectedFiles(): |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 return result | 163 return result |
165 | 164 |
166 def CheckChangeOnCommit(input_api, output_api): | 165 def CheckChangeOnCommit(input_api, output_api): |
167 return (_CheckBuildStatus(input_api, output_api) + | 166 return (_CheckBuildStatus(input_api, output_api) + |
168 _CheckNewTests(input_api, output_api) + | 167 _CheckNewTests(input_api, output_api) + |
169 _CheckDartFormat(input_api, output_api)) | 168 _CheckDartFormat(input_api, output_api)) |
170 | 169 |
171 def CheckChangeOnUpload(input_api, output_api): | 170 def CheckChangeOnUpload(input_api, output_api): |
172 return (_CheckNewTests(input_api, output_api) + | 171 return (_CheckNewTests(input_api, output_api) + |
173 _CheckDartFormat(input_api, output_api)) | 172 _CheckDartFormat(input_api, output_api)) |
OLD | NEW |