Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 "drt_updater.dart"; | 8 import "drt_updater.dart"; |
| 9 import "test_suite.dart"; | 9 import "test_suite.dart"; |
| 10 import "path.dart"; | 10 import "path.dart"; |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 215 false, | 215 false, |
| 216 type: 'bool'), | 216 type: 'bool'), |
| 217 new _TestOptionSpecification( | 217 new _TestOptionSpecification( |
| 218 'list', | 218 'list', |
| 219 'List tests only, do not run them', | 219 'List tests only, do not run them', |
| 220 ['--list'], | 220 ['--list'], |
| 221 [], | 221 [], |
| 222 false, | 222 false, |
| 223 type: 'bool'), | 223 type: 'bool'), |
| 224 new _TestOptionSpecification( | 224 new _TestOptionSpecification( |
| 225 'jsonOnly', | |
|
ricow1
2015/01/13 08:03:01
we don't store these using camel case, and to be s
kevmoo
2015/01/13 19:27:35
Done.
| |
| 226 'When doing list, output result summary in json only.', | |
| 227 ['--json-only'], | |
| 228 [], | |
| 229 false, | |
| 230 type: 'bool'), | |
| 231 new _TestOptionSpecification( | |
| 225 'time', | 232 'time', |
| 226 'Print timing information after running tests', | 233 'Print timing information after running tests', |
| 227 ['--time'], | 234 ['--time'], |
| 228 [], | 235 [], |
| 229 false, | 236 false, |
| 230 type: 'bool'), | 237 type: 'bool'), |
| 231 new _TestOptionSpecification( | 238 new _TestOptionSpecification( |
| 232 'dart', | 239 'dart', |
| 233 'Path to dart executable', | 240 'Path to dart executable', |
| 234 ['--dart'], | 241 ['--dart'], |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 674 */ | 681 */ |
| 675 List<Map> _expandConfigurations(Map configuration) { | 682 List<Map> _expandConfigurations(Map configuration) { |
| 676 // Expand the pseudo-values such as 'all'. | 683 // Expand the pseudo-values such as 'all'. |
| 677 if (configuration['arch'] == 'all') { | 684 if (configuration['arch'] == 'all') { |
| 678 configuration['arch'] = 'ia32,x64,simarm,simarm64,simmips'; | 685 configuration['arch'] = 'ia32,x64,simarm,simarm64,simmips'; |
| 679 } | 686 } |
| 680 if (configuration['mode'] == 'all') { | 687 if (configuration['mode'] == 'all') { |
| 681 configuration['mode'] = 'debug,release'; | 688 configuration['mode'] = 'debug,release'; |
| 682 } | 689 } |
| 683 | 690 |
| 691 if (configuration['jsonOnly']) { | |
| 692 configuration['list'] = true; | |
| 693 configuration['report'] = true; | |
| 694 } | |
| 695 | |
| 684 // Use verbose progress indication for verbose output unless buildbot | 696 // Use verbose progress indication for verbose output unless buildbot |
| 685 // progress indication is requested. | 697 // progress indication is requested. |
| 686 if (configuration['verbose'] && configuration['progress'] != 'buildbot') { | 698 if (configuration['verbose'] && configuration['progress'] != 'buildbot') { |
| 687 configuration['progress'] = 'verbose'; | 699 configuration['progress'] = 'verbose'; |
| 688 } | 700 } |
| 689 | 701 |
| 690 // Create the artificial negative options that test status files | 702 // Create the artificial negative options that test status files |
| 691 // expect. | 703 // expect. |
| 692 configuration['unchecked'] = !configuration['checked']; | 704 configuration['unchecked'] = !configuration['checked']; |
| 693 configuration['host_unchecked'] = !configuration['host_checked']; | 705 configuration['host_unchecked'] = !configuration['host_checked']; |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 878 return option; | 890 return option; |
| 879 } | 891 } |
| 880 } | 892 } |
| 881 print('Unknown test option $name'); | 893 print('Unknown test option $name'); |
| 882 exit(1); | 894 exit(1); |
| 883 } | 895 } |
| 884 | 896 |
| 885 | 897 |
| 886 List<_TestOptionSpecification> _options; | 898 List<_TestOptionSpecification> _options; |
| 887 } | 899 } |
| OLD | NEW |