| 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 type: 'bool'), | 341 type: 'bool'), |
| 342 new _TestOptionSpecification( | 342 new _TestOptionSpecification( |
| 343 'write_test_outcome_log', | 343 'write_test_outcome_log', |
| 344 'Write the outcome of all tests executed to a ' | 344 'Write the outcome of all tests executed to a ' |
| 345 '"${TestUtils.flakyFileName()}" file.', | 345 '"${TestUtils.flakyFileName()}" file.', |
| 346 ['--write-test-outcome-log'], | 346 ['--write-test-outcome-log'], |
| 347 [], | 347 [], |
| 348 false, | 348 false, |
| 349 type: 'bool'), | 349 type: 'bool'), |
| 350 new _TestOptionSpecification( | 350 new _TestOptionSpecification( |
| 351 'clear_safari_cache', | |
| 352 'Clear the safari cache (i.e., delete it).', | |
| 353 ['--clear_safari_cache'], | |
| 354 [], | |
| 355 false, | |
| 356 type: 'bool'), | |
| 357 new _TestOptionSpecification( | |
| 358 'clear_browser_cache', | 351 'clear_browser_cache', |
| 359 'Browser specific clearing of caches(i.e., delete it).', | 352 'Browser specific clearing of caches(i.e., delete it).', |
| 360 ['--clear_browser_cache'], | 353 ['--clear_browser_cache'], |
| 361 [], | 354 [], |
| 362 false, | 355 false, |
| 363 type: 'bool'), | 356 type: 'bool'), |
| 364 new _TestOptionSpecification( | 357 new _TestOptionSpecification( |
| 365 'copy_coredumps', | 358 'copy_coredumps', |
| 366 'If we see a crash that we did not expect, copy the core dumps. ' | 359 'If we see a crash that we did not expect, copy the core dumps. ' |
| 367 'to /tmp', | 360 'to /tmp', |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 String compiler = configuration['compiler']; | 710 String compiler = configuration['compiler']; |
| 718 configuration['browser'] = TestUtils.isBrowserRuntime(runtime); | 711 configuration['browser'] = TestUtils.isBrowserRuntime(runtime); |
| 719 configuration['analyzer'] = TestUtils.isCommandLineAnalyzer(compiler); | 712 configuration['analyzer'] = TestUtils.isCommandLineAnalyzer(compiler); |
| 720 | 713 |
| 721 // Set the javascript command line flag for less verbose status files. | 714 // Set the javascript command line flag for less verbose status files. |
| 722 configuration['jscl'] = TestUtils.isJsCommandLineRuntime(runtime); | 715 configuration['jscl'] = TestUtils.isJsCommandLineRuntime(runtime); |
| 723 | 716 |
| 724 // Allow suppression that is valid for all ie versions | 717 // Allow suppression that is valid for all ie versions |
| 725 configuration['ie'] = runtime.startsWith('ie'); | 718 configuration['ie'] = runtime.startsWith('ie'); |
| 726 | 719 |
| 727 // Temporary grace period for clear_safaci_cache | |
| 728 // See issue 18478 | |
| 729 if (configuration['clear_safari_cache']) { | |
| 730 configuration['clear_browser_cache'] = true; | |
| 731 } | |
| 732 | |
| 733 // Expand the test selectors into a suite name and a simple | 720 // Expand the test selectors into a suite name and a simple |
| 734 // regular expressions to be used on the full path of a test file | 721 // regular expressions to be used on the full path of a test file |
| 735 // in that test suite. If no selectors are explicitly given use | 722 // in that test suite. If no selectors are explicitly given use |
| 736 // the default suite patterns. | 723 // the default suite patterns. |
| 737 var selectors = configuration['selectors']; | 724 var selectors = configuration['selectors']; |
| 738 if (selectors is !Map) { | 725 if (selectors is !Map) { |
| 739 if (selectors == null) { | 726 if (selectors == null) { |
| 740 if (configuration['suite_dir'] != null) { | 727 if (configuration['suite_dir'] != null) { |
| 741 var suite_path = new Path(configuration['suite_dir']); | 728 var suite_path = new Path(configuration['suite_dir']); |
| 742 selectors = [suite_path.filename]; | 729 selectors = [suite_path.filename]; |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 return option; | 880 return option; |
| 894 } | 881 } |
| 895 } | 882 } |
| 896 print('Unknown test option $name'); | 883 print('Unknown test option $name'); |
| 897 exit(1); | 884 exit(1); |
| 898 } | 885 } |
| 899 | 886 |
| 900 | 887 |
| 901 List<_TestOptionSpecification> _options; | 888 List<_TestOptionSpecification> _options; |
| 902 } | 889 } |
| OLD | NEW |