| 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"; |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 _constructReproducingCommandArguments(config); | 445 _constructReproducingCommandArguments(config); |
| 446 } | 446 } |
| 447 return result.isEmpty ? null : result; | 447 return result.isEmpty ? null : result; |
| 448 } | 448 } |
| 449 | 449 |
| 450 // For printing out reproducing command lines, we don't want to add these | 450 // For printing out reproducing command lines, we don't want to add these |
| 451 // options. | 451 // options. |
| 452 Set<String> _blacklistedOptions = new Set<String>.from([ | 452 Set<String> _blacklistedOptions = new Set<String>.from([ |
| 453 'progress', 'failure-summary', 'step_name', 'report', 'tasks', 'verbose', | 453 'progress', 'failure-summary', 'step_name', 'report', 'tasks', 'verbose', |
| 454 'time', 'dart', 'drt', 'dartium', 'build_directory', 'append_logs', | 454 'time', 'dart', 'drt', 'dartium', 'build_directory', 'append_logs', |
| 455 'write_debug_log', 'local_ip', 'shard', 'shards', | 455 'local_ip', 'shard', 'shards', |
| 456 ]); | 456 ]); |
| 457 | 457 |
| 458 List<String> _constructReproducingCommandArguments(Map config) { | 458 List<String> _constructReproducingCommandArguments(Map config) { |
| 459 var arguments = new List<String>(); | 459 var arguments = new List<String>(); |
| 460 for (var configKey in config.keys) { | 460 for (var configKey in config.keys) { |
| 461 if (!_blacklistedOptions.contains(configKey)) { | 461 if (!_blacklistedOptions.contains(configKey)) { |
| 462 for (var option in _options) { | 462 for (var option in _options) { |
| 463 var configValue = config[configKey]; | 463 var configValue = config[configKey]; |
| 464 // We only include entries of [conf] if we find an option for it. | 464 // We only include entries of [conf] if we find an option for it. |
| 465 if (configKey == option.name && configValue != option.defaultValue) { | 465 if (configKey == option.name && configValue != option.defaultValue) { |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 } else if (configuration['arch'] == 'arm') { | 669 } else if (configuration['arch'] == 'arm') { |
| 670 timeout *= 4; | 670 timeout *= 4; |
| 671 } else if (configuration['arch'] == 'simmips') { | 671 } else if (configuration['arch'] == 'simmips') { |
| 672 timeout *= 4; | 672 timeout *= 4; |
| 673 } else if (configuration['arch'] == 'mips') { | 673 } else if (configuration['arch'] == 'mips') { |
| 674 timeout *= 4; | 674 timeout *= 4; |
| 675 } | 675 } |
| 676 if (configuration['mode'] == 'debug') { | 676 if (configuration['mode'] == 'debug') { |
| 677 timeout *= 2; | 677 timeout *= 2; |
| 678 } | 678 } |
| 679 if (const ['drt', 'dartium'].contains(configuration['runtime'])) { | 679 if (const ['drt'].contains(configuration['runtime'])) { |
| 680 timeout *= 4; // Allow additional time for browser testing to run. | 680 timeout *= 4; // Allow additional time for browser testing to run. |
| 681 } | 681 } |
| 682 break; | 682 break; |
| 683 } | 683 } |
| 684 configuration['timeout'] = timeout; | 684 configuration['timeout'] = timeout; |
| 685 } | 685 } |
| 686 | 686 |
| 687 return [configuration]; | 687 return [configuration]; |
| 688 } | 688 } |
| 689 | 689 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 return option; | 755 return option; |
| 756 } | 756 } |
| 757 } | 757 } |
| 758 print('Unknown test option $name'); | 758 print('Unknown test option $name'); |
| 759 exit(1); | 759 exit(1); |
| 760 } | 760 } |
| 761 | 761 |
| 762 | 762 |
| 763 List<_TestOptionSpecification> _options; | 763 List<_TestOptionSpecification> _options; |
| 764 } | 764 } |
| OLD | NEW |