| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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:builtin"); | 8 #import("dart:builtin"); |
| 9 #import("drt_updater.dart"); |
| 9 | 10 |
| 10 List<String> defaultTestSelectors = | 11 List<String> defaultTestSelectors = |
| 11 const ['dartc', 'samples', 'standalone', 'corelib', 'co19', 'language', | 12 const ['dartc', 'samples', 'standalone', 'corelib', 'co19', 'language', |
| 12 'isolate', 'vm', 'client', 'dartdoc', 'utils']; | 13 'isolate', 'vm', 'client', 'dartdoc', 'utils']; |
| 13 | 14 |
| 14 /** | 15 /** |
| 15 * Specification of a single test option. | 16 * Specification of a single test option. |
| 16 * | 17 * |
| 17 * The name of the specification is used as the key for the option in | 18 * The name of the specification is used as the key for the option in |
| 18 * the Map returned from the [TestOptionParser] parse method. | 19 * the Map returned from the [TestOptionParser] parse method. |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 // Expand components. | 451 // Expand components. |
| 451 var components = configuration['component']; | 452 var components = configuration['component']; |
| 452 if (components.contains(',')) { | 453 if (components.contains(',')) { |
| 453 var result = new List<Map>(); | 454 var result = new List<Map>(); |
| 454 for (var component in components.split(',')) { | 455 for (var component in components.split(',')) { |
| 455 var newConfiguration = new Map.from(configuration); | 456 var newConfiguration = new Map.from(configuration); |
| 456 newConfiguration['component'] = component; | 457 newConfiguration['component'] = component; |
| 457 result.addAll(_expandConfigurations(newConfiguration)); | 458 result.addAll(_expandConfigurations(newConfiguration)); |
| 458 } | 459 } |
| 459 return result; | 460 return result; |
| 461 } else { |
| 462 // All components eventually go through this path, after expansion. |
| 463 if (DumpRenderTreeUpdater.componentRequiresDRT(components)) { |
| 464 DumpRenderTreeUpdater.update(); |
| 465 } |
| 460 } | 466 } |
| 461 | 467 |
| 462 // Adjust default timeout based on mode and component. | 468 // Adjust default timeout based on mode and component. |
| 463 if (configuration['timeout'] == -1) { | 469 if (configuration['timeout'] == -1) { |
| 464 var timeout = 60; | 470 var timeout = 60; |
| 465 switch (configuration['component']) { | 471 switch (configuration['component']) { |
| 466 case 'dartc': | 472 case 'dartc': |
| 467 case 'chromium': | 473 case 'chromium': |
| 468 case 'dartium': | 474 case 'dartium': |
| 469 case 'frogium': | 475 case 'frogium': |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 return option; | 543 return option; |
| 538 } | 544 } |
| 539 } | 545 } |
| 540 print('Unknown test option $name'); | 546 print('Unknown test option $name'); |
| 541 exit(1); | 547 exit(1); |
| 542 } | 548 } |
| 543 | 549 |
| 544 | 550 |
| 545 List<_TestOptionSpecification> _options; | 551 List<_TestOptionSpecification> _options; |
| 546 } | 552 } |
| OLD | NEW |