| 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 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 } else { | 817 } else { |
| 818 // All runtimes eventually go through this path, after expansion. | 818 // All runtimes eventually go through this path, after expansion. |
| 819 var updater = runtimeUpdater(configuration); | 819 var updater = runtimeUpdater(configuration); |
| 820 if (updater != null) { | 820 if (updater != null) { |
| 821 updater.update(); | 821 updater.update(); |
| 822 } | 822 } |
| 823 } | 823 } |
| 824 | 824 |
| 825 // Adjust default timeout based on mode, compiler, and sometimes runtime. | 825 // Adjust default timeout based on mode, compiler, and sometimes runtime. |
| 826 if (configuration['timeout'] == -1) { | 826 if (configuration['timeout'] == -1) { |
| 827 var isReload = configuration['hot_reload'] || |
| 828 configuration['hot_reload_rollback']; |
| 827 int compilerMulitiplier = | 829 int compilerMulitiplier = |
| 828 new CompilerConfiguration(configuration).computeTimeoutMultiplier(); | 830 new CompilerConfiguration(configuration).computeTimeoutMultiplier(); |
| 829 int runtimeMultiplier = new RuntimeConfiguration(configuration) | 831 int runtimeMultiplier = new RuntimeConfiguration(configuration) |
| 830 .computeTimeoutMultiplier( | 832 .computeTimeoutMultiplier( |
| 831 mode: configuration['mode'], | 833 mode: configuration['mode'], |
| 832 isChecked: configuration['checked'], | 834 isChecked: configuration['checked'], |
| 835 isReload: isReload, |
| 833 arch: configuration['arch']); | 836 arch: configuration['arch']); |
| 834 configuration['timeout'] = 60 * compilerMulitiplier * runtimeMultiplier; | 837 configuration['timeout'] = 60 * compilerMulitiplier * runtimeMultiplier; |
| 835 } | 838 } |
| 836 | 839 |
| 837 return [configuration]; | 840 return [configuration]; |
| 838 } | 841 } |
| 839 | 842 |
| 840 /** | 843 /** |
| 841 * Helper for _expandConfigurations. Creates a new configuration and adds it | 844 * Helper for _expandConfigurations. Creates a new configuration and adds it |
| 842 * to a list, for use in a case when a particular configuration has multiple | 845 * to a list, for use in a case when a particular configuration has multiple |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 909 if (option.keys.contains(name)) { | 912 if (option.keys.contains(name)) { |
| 910 return option; | 913 return option; |
| 911 } | 914 } |
| 912 } | 915 } |
| 913 print('Unknown test option $name'); | 916 print('Unknown test option $name'); |
| 914 exit(1); | 917 exit(1); |
| 915 } | 918 } |
| 916 | 919 |
| 917 List<_TestOptionSpecification> _options; | 920 List<_TestOptionSpecification> _options; |
| 918 } | 921 } |
| OLD | NEW |