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 "compiler_configuration.dart" show CompilerConfiguration; | 10 import "compiler_configuration.dart" show CompilerConfiguration; |
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 result.addAll(_expandConfigurations(newConfiguration)); | 810 result.addAll(_expandConfigurations(newConfiguration)); |
811 } | 811 } |
812 return result; | 812 return result; |
813 } | 813 } |
814 | 814 |
815 | 815 |
816 /** | 816 /** |
817 * Print out usage information. | 817 * Print out usage information. |
818 */ | 818 */ |
819 void _printHelp() { | 819 void _printHelp() { |
820 print('usage: dart test.dart [options]\n'); | 820 print('usage: dart test.dart [options] [selector]'); |
| 821 print(''); |
| 822 print('The optional selector limits the tests that will be run.'); |
| 823 print('For example, the selector "language/issue", or equivalently'); |
| 824 print('"language/*issue*", limits to test files matching the regexp'); |
| 825 print('".*issue.*\\.dart" in the "tests/language" directory.'); |
| 826 print(''); |
821 print('Options:\n'); | 827 print('Options:\n'); |
822 for (var option in _options) { | 828 for (var option in _options) { |
823 print('${option.name}: ${option.description}.'); | 829 print('${option.name}: ${option.description}.'); |
824 for (var name in option.keys) { | 830 for (var name in option.keys) { |
825 assert(name.startsWith('-')); | 831 assert(name.startsWith('-')); |
826 var buffer = new StringBuffer();; | 832 var buffer = new StringBuffer();; |
827 buffer.write(name); | 833 buffer.write(name); |
828 if (option.type == 'bool') { | 834 if (option.type == 'bool') { |
829 assert(option.values.isEmpty); | 835 assert(option.values.isEmpty); |
830 } else { | 836 } else { |
(...skipping 29 matching lines...) Expand all Loading... |
860 return option; | 866 return option; |
861 } | 867 } |
862 } | 868 } |
863 print('Unknown test option $name'); | 869 print('Unknown test option $name'); |
864 exit(1); | 870 exit(1); |
865 } | 871 } |
866 | 872 |
867 | 873 |
868 List<_TestOptionSpecification> _options; | 874 List<_TestOptionSpecification> _options; |
869 } | 875 } |
OLD | NEW |