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 #import("dart:builtin"); | 8 #import("dart:builtin"); |
9 #import("drt_updater.dart"); | 9 #import("drt_updater.dart"); |
10 | 10 |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 | 351 |
352 return _expandConfigurations(configuration); | 352 return _expandConfigurations(configuration); |
353 } | 353 } |
354 | 354 |
355 | 355 |
356 /** | 356 /** |
357 * Recursively expand a configuration with multiple values per key | 357 * Recursively expand a configuration with multiple values per key |
358 * into a list of configurations with exactly one value per key. | 358 * into a list of configurations with exactly one value per key. |
359 */ | 359 */ |
360 List<Map> _expandConfigurations(Map configuration) { | 360 List<Map> _expandConfigurations(Map configuration) { |
361 | |
362 // TODO(ager): Get rid of this. This is for backwards | |
363 // compatibility with the python test scripts. They use system | |
364 // 'win32' for Windows. | |
365 if (configuration['system'] == 'windows') { | |
366 configuration['system'] = 'win32'; | |
367 } | |
368 | |
369 // Expand the pseudo-values such as 'all'. | 361 // Expand the pseudo-values such as 'all'. |
370 if (configuration['arch'] == 'all') { | 362 if (configuration['arch'] == 'all') { |
371 configuration['arch'] = 'ia32,x64'; | 363 configuration['arch'] = 'ia32,x64'; |
372 } | 364 } |
373 if (configuration['mode'] == 'all') { | 365 if (configuration['mode'] == 'all') { |
374 configuration['mode'] = 'debug,release'; | 366 configuration['mode'] = 'debug,release'; |
375 } | 367 } |
376 if (configuration['component'] == 'most') { | 368 if (configuration['component'] == 'most') { |
377 configuration['component'] = 'vm,dartc'; | 369 configuration['component'] = 'vm,dartc'; |
378 } | 370 } |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 return option; | 543 return option; |
552 } | 544 } |
553 } | 545 } |
554 print('Unknown test option $name'); | 546 print('Unknown test option $name'); |
555 exit(1); | 547 exit(1); |
556 } | 548 } |
557 | 549 |
558 | 550 |
559 List<_TestOptionSpecification> _options; | 551 List<_TestOptionSpecification> _options; |
560 } | 552 } |
OLD | NEW |