| 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 "../../../tools/testing/dart/test_runner.dart"; | 8 import "../../../tools/testing/dart/test_runner.dart"; |
| 9 import "../../../tools/testing/dart/test_suite.dart"; | 9 import "../../../tools/testing/dart/test_suite.dart"; |
| 10 import "../../../tools/testing/dart/test_progress.dart" as progress; | 10 import "../../../tools/testing/dart/test_progress.dart" as progress; |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 enqueueTestCase(testCaseTimeout); | 76 enqueueTestCase(testCaseTimeout); |
| 77 enqueueTestCase(testCaseFailUnexpected); | 77 enqueueTestCase(testCaseFailUnexpected); |
| 78 | 78 |
| 79 if (onDone != null) { | 79 if (onDone != null) { |
| 80 onDone(); | 80 onDone(); |
| 81 } | 81 } |
| 82 } | 82 } |
| 83 | 83 |
| 84 TestCase _makeNormalTestCase(name, expectations) { | 84 TestCase _makeNormalTestCase(name, expectations) { |
| 85 var command = CommandBuilder.instance.getCommand( | 85 var command = CommandBuilder.instance.getCommand( |
| 86 'custom', Platform.executable, [Platform.script, name], | 86 'custom', Platform.executable, [Platform.script.toFilePath(), name], |
| 87 'ReleaseIA32'); | 87 'ReleaseIA32'); |
| 88 return _makeTestCase(name, DEFAULT_TIMEOUT, command, expectations); | 88 return _makeTestCase(name, DEFAULT_TIMEOUT, command, expectations); |
| 89 } | 89 } |
| 90 | 90 |
| 91 _makeCrashTestCase(name, expectations) { | 91 _makeCrashTestCase(name, expectations) { |
| 92 var crashCommand = CommandBuilder.instance.getCommand( | 92 var crashCommand = CommandBuilder.instance.getCommand( |
| 93 'custom_crash', getProcessTestFileName(), ["0", "0", "1", "1"], | 93 'custom_crash', getProcessTestFileName(), ["0", "0", "1", "1"], |
| 94 'ReleaseIA32'); | 94 'ReleaseIA32'); |
| 95 // The crash test sometimes times out. Run it with a large timeout | 95 // The crash test sometimes times out. Run it with a large timeout |
| 96 // to help diagnose the delay. | 96 // to help diagnose the delay. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 break; | 141 break; |
| 142 case 'timeout': | 142 case 'timeout': |
| 143 // Run for 10 seconds, then exit. This tests a 2 second timeout. | 143 // Run for 10 seconds, then exit. This tests a 2 second timeout. |
| 144 new Timer(new Duration(seconds: 10), (){ }); | 144 new Timer(new Duration(seconds: 10), (){ }); |
| 145 break; | 145 break; |
| 146 default: | 146 default: |
| 147 throw "Unknown option ${arguments[0]} passed to test_runner_test"; | 147 throw "Unknown option ${arguments[0]} passed to test_runner_test"; |
| 148 } | 148 } |
| 149 } | 149 } |
| 150 } | 150 } |
| OLD | NEW |