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 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
803 result.addAll(_expandConfigurations(newConfiguration)); | 803 result.addAll(_expandConfigurations(newConfiguration)); |
804 } | 804 } |
805 return result; | 805 return result; |
806 } | 806 } |
807 | 807 |
808 | 808 |
809 /** | 809 /** |
810 * Print out usage information. | 810 * Print out usage information. |
811 */ | 811 */ |
812 void _printHelp() { | 812 void _printHelp() { |
813 print('usage: dart test.dart [options]\n'); | 813 print('usage: dart test.dart [options] [selector]'); |
| 814 print(''); |
| 815 print('The optional selector limits the tests that will be run.'); |
| 816 print('For example, the selector "language/issue", or equivalently'); |
| 817 print('"language/*issue*", limits to test files matching the regexp'); |
| 818 print('".*issue.*\\.dart" in the "tests/language" directory.'); |
| 819 print(''); |
814 print('Options:\n'); | 820 print('Options:\n'); |
815 for (var option in _options) { | 821 for (var option in _options) { |
816 print('${option.name}: ${option.description}.'); | 822 print('${option.name}: ${option.description}.'); |
817 for (var name in option.keys) { | 823 for (var name in option.keys) { |
818 assert(name.startsWith('-')); | 824 assert(name.startsWith('-')); |
819 var buffer = new StringBuffer();; | 825 var buffer = new StringBuffer();; |
820 buffer.write(name); | 826 buffer.write(name); |
821 if (option.type == 'bool') { | 827 if (option.type == 'bool') { |
822 assert(option.values.isEmpty); | 828 assert(option.values.isEmpty); |
823 } else { | 829 } else { |
(...skipping 29 matching lines...) Expand all Loading... |
853 return option; | 859 return option; |
854 } | 860 } |
855 } | 861 } |
856 print('Unknown test option $name'); | 862 print('Unknown test option $name'); |
857 exit(1); | 863 exit(1); |
858 } | 864 } |
859 | 865 |
860 | 866 |
861 List<_TestOptionSpecification> _options; | 867 List<_TestOptionSpecification> _options; |
862 } | 868 } |
OLD | NEW |