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

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

Issue 9348015: Make test.dart exit with an error message when a selector is repeated. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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("test_options_parser"); 5 #library("test_options_parser");
6 6
7 #import("dart:io"); 7 #import("dart:io");
8 8
9 List<String> defaultTestSelectors = 9 List<String> defaultTestSelectors =
10 const ['dartc', 'samples', 'standalone', 'corelib', 'co19', 'language', 10 const ['dartc', 'samples', 'standalone', 'corelib', 'co19', 'language',
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 var slashLocation = pattern.indexOf('/'); 366 var slashLocation = pattern.indexOf('/');
367 if (slashLocation != -1) { 367 if (slashLocation != -1) {
368 suite = pattern.substring(0, slashLocation); 368 suite = pattern.substring(0, slashLocation);
369 pattern = pattern.substring(slashLocation + 1); 369 pattern = pattern.substring(slashLocation + 1);
370 pattern = pattern.replaceAll('*', '.*'); 370 pattern = pattern.replaceAll('*', '.*');
371 pattern = pattern.replaceAll('/', '.*'); 371 pattern = pattern.replaceAll('/', '.*');
372 } else { 372 } else {
373 pattern = ".*"; 373 pattern = ".*";
374 } 374 }
375 if (selectorMap.containsKey(suite)) { 375 if (selectorMap.containsKey(suite)) {
376 print("Warning: selector '$suite/$pattern' overrides " + 376 print("Error: '$suite/$pattern'. Only one test selection" +
377 "previous selector for suite '$suite'"); 377 " pattern is allowed to start with '$suite/'");
378 exit(1);
378 } 379 }
379 selectorMap[suite] = new RegExp(pattern); 380 selectorMap[suite] = new RegExp(pattern);
380 } 381 }
381 configuration['selectors'] = selectorMap; 382 configuration['selectors'] = selectorMap;
382 } 383 }
383 384
384 // Expand the architectures. 385 // Expand the architectures.
385 var archs = configuration['arch']; 386 var archs = configuration['arch'];
386 if (archs.contains(',')) { 387 if (archs.contains(',')) {
387 var result = new List<Map>(); 388 var result = new List<Map>();
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 return option; 494 return option;
494 } 495 }
495 } 496 }
496 print('Unknown test option $name'); 497 print('Unknown test option $name');
497 exit(1); 498 exit(1);
498 } 499 }
499 500
500 501
501 List<_TestOptionSpecification> _options; 502 List<_TestOptionSpecification> _options;
502 } 503 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698