| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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("../../../../tools/testing/dart/test_runner.dart"); | 6 #import("../../../../tools/testing/dart/test_runner.dart"); |
| 7 #import("../../../../tools/testing/dart/status_file_parser.dart"); | 7 #import("../../../../tools/testing/dart/status_file_parser.dart"); |
| 8 #import("../../../../tools/testing/dart/test_options.dart"); | 8 #import("../../../../tools/testing/dart/test_options.dart"); |
| 9 #source("ProcessTestUtil.dart"); | 9 #source("ProcessTestUtil.dart"); |
| 10 | 10 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 TestController.processCompletedTest, | 53 TestController.processCompletedTest, |
| 54 new Set<String>.from(expectations)); | 54 new Set<String>.from(expectations)); |
| 55 } | 55 } |
| 56 | 56 |
| 57 | 57 |
| 58 void main() { | 58 void main() { |
| 59 new RunningProcess(MakeTestCase("PassTest", [PASS])).start(); | 59 new RunningProcess(MakeTestCase("PassTest", [PASS])).start(); |
| 60 new RunningProcess(MakeTestCase("FailTest", [FAIL])).start(); | 60 new RunningProcess(MakeTestCase("FailTest", [FAIL])).start(); |
| 61 new RunningProcess(MakeTestCase("TimeoutTest", [TIMEOUT])).start(); | 61 new RunningProcess(MakeTestCase("TimeoutTest", [TIMEOUT])).start(); |
| 62 | 62 |
| 63 var configuration = new TestOptionsParser().parse(['--timeout', '10'])[0]; | 63 // The crash test sometimes times out. Run it with a large timeout to help |
| 64 // diagnose the delay. |
| 65 // The test loads a new executable, which may sometimes take a long time. |
| 66 // It involves a wait on the VM event loop, and possible system delays. |
| 67 var configuration = new TestOptionsParser().parse(['--timeout', '60'])[0]; |
| 64 new RunningProcess(new TestCase("CrashTest", | 68 new RunningProcess(new TestCase("CrashTest", |
| 65 [new Command(getProcessTestFileName(), | 69 [new Command(getProcessTestFileName(), |
| 66 const ["0", "0", "1", "1"])], | 70 const ["0", "0", "1", "1"])], |
| 67 configuration, | 71 configuration, |
| 68 TestController.processCompletedTest, | 72 TestController.processCompletedTest, |
| 69 new Set<String>.from([CRASH]))).start(); | 73 new Set<String>.from([CRASH]))).start(); |
| 70 Expect.equals(4, TestController.numTests); | 74 Expect.equals(4, TestController.numTests); |
| 71 // Throw must be from body of start() function for this test to work. | 75 // Throw must be from body of start() function for this test to work. |
| 72 Expect.throws(new RunningProcess(MakeTestCase("PassTest", [SKIP])).start); | 76 Expect.throws(new RunningProcess(MakeTestCase("PassTest", [SKIP])).start); |
| 73 } | 77 } |
| OLD | NEW |