Chromium Code Reviews| 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 import "dart:io"; | 5 import "dart:io"; |
| 6 import "dart:isolate"; | 6 import "dart:isolate"; |
| 7 import "dart:async"; | 7 import "dart:async"; |
| 8 import "dart:utf"; | 8 import "dart:utf"; |
| 9 import "../../../tools/testing/dart/test_runner.dart"; | 9 import "../../../tools/testing/dart/test_runner.dart"; |
| 10 import "../../../tools/testing/dart/test_suite.dart"; | 10 import "../../../tools/testing/dart/test_suite.dart"; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 102 var maxProcesses = 2; | 102 var maxProcesses = 2; |
| 103 var maxBrowserProcesses = maxProcesses; | 103 var maxBrowserProcesses = maxProcesses; |
| 104 new ProcessQueue(maxProcesses, maxBrowserProcesses, | 104 new ProcessQueue(maxProcesses, maxBrowserProcesses, |
| 105 new DateTime.now(), [new CustomTestSuite()], [], TestController.finished); | 105 new DateTime.now(), [new CustomTestSuite()], [], TestController.finished); |
| 106 } | 106 } |
| 107 | 107 |
| 108 void main() { | 108 void main() { |
| 109 // Run the test_runner_test if there are no command-line options. | 109 // Run the test_runner_test if there are no command-line options. |
| 110 // Otherwise, run one of the component tests that always pass, | 110 // Otherwise, run one of the component tests that always pass, |
| 111 // fail, or timeout. | 111 // fail, or timeout. |
| 112 var arguments = Platform.arguments; | 112 var arguments = new Options().arguments; |
|
ricow1
2013/06/28 08:28:34
Same as last file
| |
| 113 if (arguments.isEmpty) { | 113 if (arguments.isEmpty) { |
| 114 testProcessQueue(); | 114 testProcessQueue(); |
| 115 } else { | 115 } else { |
| 116 switch (arguments[0]) { | 116 switch (arguments[0]) { |
| 117 case 'pass': | 117 case 'pass': |
| 118 return; | 118 return; |
| 119 case 'fail-unexpected': | 119 case 'fail-unexpected': |
| 120 case 'fail': | 120 case 'fail': |
| 121 throw "This test always fails, to test the test scripts."; | 121 throw "This test always fails, to test the test scripts."; |
| 122 break; | 122 break; |
| 123 case 'timeout': | 123 case 'timeout': |
| 124 // Run for 10 seconds, then exit. This tests a 2 second timeout. | 124 // Run for 10 seconds, then exit. This tests a 2 second timeout. |
| 125 new Timer(new Duration(seconds: 10), (){ }); | 125 new Timer(new Duration(seconds: 10), (){ }); |
| 126 break; | 126 break; |
| 127 default: | 127 default: |
| 128 throw "Unknown option ${arguments[0]} passed to test_runner_test"; | 128 throw "Unknown option ${arguments[0]} passed to test_runner_test"; |
| 129 } | 129 } |
| 130 } | 130 } |
| 131 } | 131 } |
| OLD | NEW |