Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Side by Side Diff: tools/testing/dart/status_file_parser.dart

Issue 9036009: Add client/tests/client web tests to the test.dart test script. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #library("status_file_parser"); 5 #library("status_file_parser");
6 6
7 7
8 #import("status_expression.dart"); 8 #import("status_expression.dart");
9 9
10 // Possible outcomes of running a test. 10 // Possible outcomes of running a test.
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 splitFilename.add(component); 197 splitFilename.add(component);
198 } 198 }
199 }); 199 });
200 } 200 }
201 201
202 // Create mapping from keys to list of RegExps once and for all. 202 // Create mapping from keys to list of RegExps once and for all.
203 _preprocessForMatching(); 203 _preprocessForMatching();
204 204
205 _map.forEach((key, expectation) { 205 _map.forEach((key, expectation) {
206 List regExps = _keyToRegExps[key]; 206 List regExps = _keyToRegExps[key];
207 if (regExps.length > splitFilename.length) return; 207 if (true || _complexMatching) {
208 for (var i = 0; i < regExps.length; i++) { 208 if (regExps.length > splitFilename.length) return;
209 if (!regExps[i].hasMatch(splitFilename[i])) return; 209 for (var i = 0; i < regExps.length; i++) {
210 if (!regExps[i].hasMatch(splitFilename[i])) return;
211 }
212 // If all components of the status file key matches the filename
213 // add the expectations to the result.
214 result.addAll(expectation);
215 } else {
216 // TODO(whesse): Make paths match completely for non-co19 matching.
217 if (splitFilename.length > 1) {
218 print('Filename with path separator used to match: $filename');
219 } else if (regExps[regExps.length - 1].hasMatch(splitFilename[0])) {
220 result.addAll(expectation);
221 }
210 } 222 }
211 // If all components of the status file key matches the filename
212 // add the expectations to the result.
213 result.addAll(expectation);
214 }); 223 });
215 224
216 // If no expectations were found the expectation is that the test 225 // If no expectations were found the expectation is that the test
217 // passes. 226 // passes.
218 if (result.isEmpty()) { 227 if (result.isEmpty()) {
219 result.add(PASS); 228 result.add(PASS);
220 } 229 }
221 return result; 230 return result;
222 } 231 }
223 232
(...skipping 20 matching lines...) Expand all
244 } 253 }
245 regExps[i] = regExp; 254 regExps[i] = regExp;
246 } 255 }
247 _keyToRegExps[key] = regExps; 256 _keyToRegExps[key] = regExps;
248 }); 257 });
249 258
250 _regExpCache = null; 259 _regExpCache = null;
251 _preprocessed = true; 260 _preprocessed = true;
252 } 261 }
253 } 262 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698