| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |