| 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 | 8 |
| 9 List<String> defaultTestSelectors = | 9 List<String> defaultTestSelectors = |
| 10 const ['dartc', 'samples', 'standalone', 'corelib', 'co19', 'language', | 10 const ['dartc', 'samples', 'standalone', 'corelib', 'co19', 'language', |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 'mode', | 57 'mode', |
| 58 'Mode in which to run the tests', | 58 'Mode in which to run the tests', |
| 59 ['-m', '--mode'], | 59 ['-m', '--mode'], |
| 60 ['all', 'debug', 'release'], | 60 ['all', 'debug', 'release'], |
| 61 'debug'), | 61 'debug'), |
| 62 new _TestOptionSpecification( | 62 new _TestOptionSpecification( |
| 63 'component', | 63 'component', |
| 64 'The component to test against', | 64 'The component to test against', |
| 65 ['-c', '--component'], | 65 ['-c', '--component'], |
| 66 ['most', 'vm', 'dartc', 'frog', 'frogsh', 'leg', | 66 ['most', 'vm', 'dartc', 'frog', 'frogsh', 'leg', |
| 67 'dartium', 'chromium', 'frogium', 'webdriver'], | 67 'dartium', 'chromium', 'frogium', 'legium', 'webdriver'], |
| 68 'vm'), | 68 'vm'), |
| 69 new _TestOptionSpecification( | 69 new _TestOptionSpecification( |
| 70 'arch', | 70 'arch', |
| 71 'The architecture to run tests for', | 71 'The architecture to run tests for', |
| 72 ['-a', '--arch'], | 72 ['-a', '--arch'], |
| 73 ['all', 'ia32', 'x64', 'simarm'], | 73 ['all', 'ia32', 'x64', 'simarm'], |
| 74 'ia32'), | 74 'ia32'), |
| 75 new _TestOptionSpecification( | 75 new _TestOptionSpecification( |
| 76 'system', | 76 'system', |
| 77 'The operating system to run tests on', | 77 'The operating system to run tests on', |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 } | 419 } |
| 420 | 420 |
| 421 // Adjust default timeout based on mode and component. | 421 // Adjust default timeout based on mode and component. |
| 422 if (configuration['timeout'] == -1) { | 422 if (configuration['timeout'] == -1) { |
| 423 var timeout = 60; | 423 var timeout = 60; |
| 424 switch (configuration['component']) { | 424 switch (configuration['component']) { |
| 425 case 'dartc': | 425 case 'dartc': |
| 426 case 'chromium': | 426 case 'chromium': |
| 427 case 'dartium': | 427 case 'dartium': |
| 428 case 'frogium': | 428 case 'frogium': |
| 429 case 'legium': |
| 429 case 'webdriver': | 430 case 'webdriver': |
| 430 timeout *= 4; | 431 timeout *= 4; |
| 431 break; | 432 break; |
| 432 case 'leg': | 433 case 'leg': |
| 433 case 'frog': | 434 case 'frog': |
| 434 if (configuration['mode'] == 'debug') { | 435 if (configuration['mode'] == 'debug') { |
| 435 timeout *= 4; | 436 timeout *= 4; |
| 436 } | 437 } |
| 437 break; | 438 break; |
| 438 default: | 439 default: |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 return option; | 496 return option; |
| 496 } | 497 } |
| 497 } | 498 } |
| 498 print('Unknown test option $name'); | 499 print('Unknown test option $name'); |
| 499 exit(1); | 500 exit(1); |
| 500 } | 501 } |
| 501 | 502 |
| 502 | 503 |
| 503 List<_TestOptionSpecification> _options; | 504 List<_TestOptionSpecification> _options; |
| 504 } | 505 } |
| OLD | NEW |