| 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 "dart:math"; | 8 import "dart:math"; |
| 9 import "drt_updater.dart"; | 9 import "drt_updater.dart"; |
| 10 import "test_suite.dart"; | 10 import "test_suite.dart"; |
| 11 | 11 |
| 12 List<String> defaultTestSelectors = | 12 List<String> defaultTestSelectors = |
| 13 const ['dartc', 'samples', 'standalone', 'corelib', 'co19', 'language', | 13 const ['dartc', 'samples', 'standalone', 'corelib', 'co19', 'language', |
| 14 'isolate', 'vm', 'html', 'json', 'benchmark_smoke', | 14 'isolate', 'vm', 'html', 'json', 'benchmark_smoke', |
| 15 'utils', 'lib', 'pkg', 'analyze_library']; | 15 'utils', 'lib', 'pkg', 'analyze_library', 'analyze_tests']; |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * Specification of a single test option. | 18 * Specification of a single test option. |
| 19 * | 19 * |
| 20 * The name of the specification is used as the key for the option in | 20 * The name of the specification is used as the key for the option in |
| 21 * the Map returned from the [TestOptionParser] parse method. | 21 * the Map returned from the [TestOptionParser] parse method. |
| 22 */ | 22 */ |
| 23 class _TestOptionSpecification { | 23 class _TestOptionSpecification { |
| 24 _TestOptionSpecification(this.name, | 24 _TestOptionSpecification(this.name, |
| 25 this.description, | 25 this.description, |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 configuration['unminified'] = !configuration['minified']; | 516 configuration['unminified'] = !configuration['minified']; |
| 517 | 517 |
| 518 String runtime = configuration['runtime']; | 518 String runtime = configuration['runtime']; |
| 519 if (runtime == 'firefox') { | 519 if (runtime == 'firefox') { |
| 520 configuration['runtime'] == 'ff'; | 520 configuration['runtime'] == 'ff'; |
| 521 } | 521 } |
| 522 | 522 |
| 523 String compiler = configuration['compiler']; | 523 String compiler = configuration['compiler']; |
| 524 configuration['browser'] = TestUtils.isBrowserRuntime(runtime); | 524 configuration['browser'] = TestUtils.isBrowserRuntime(runtime); |
| 525 configuration['analyzer'] = TestUtils.isCommandLineAnalyzer(compiler); | 525 configuration['analyzer'] = TestUtils.isCommandLineAnalyzer(compiler); |
| 526 | 526 |
| 527 // Set the javascript command line flag for less verbose status files. | 527 // Set the javascript command line flag for less verbose status files. |
| 528 configuration['jscl'] = TestUtils.isJsCommandLineRuntime(runtime); | 528 configuration['jscl'] = TestUtils.isJsCommandLineRuntime(runtime); |
| 529 | 529 |
| 530 // Expand the test selectors into a suite name and a simple | 530 // Expand the test selectors into a suite name and a simple |
| 531 // regular expressions to be used on the full path of a test file | 531 // regular expressions to be used on the full path of a test file |
| 532 // in that test suite. If no selectors are explicitly given use | 532 // in that test suite. If no selectors are explicitly given use |
| 533 // the default suite patterns. | 533 // the default suite patterns. |
| 534 var selectors = configuration['selectors']; | 534 var selectors = configuration['selectors']; |
| 535 if (selectors is !Map) { | 535 if (selectors is !Map) { |
| 536 if (selectors == null) { | 536 if (selectors == null) { |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 return option; | 692 return option; |
| 693 } | 693 } |
| 694 } | 694 } |
| 695 print('Unknown test option $name'); | 695 print('Unknown test option $name'); |
| 696 exit(1); | 696 exit(1); |
| 697 } | 697 } |
| 698 | 698 |
| 699 | 699 |
| 700 List<_TestOptionSpecification> _options; | 700 List<_TestOptionSpecification> _options; |
| 701 } | 701 } |
| OLD | NEW |