Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(785)

Unified Diff: tests/standalone/src/TestRunnerTest.dart

Issue 8494006: Fix standalone/TestRunnerTest timeout and file-not-found errors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Change timeout to 10 seconds. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/TestRunnerTest.dart
diff --git a/tests/standalone/src/TestRunnerTest.dart b/tests/standalone/src/TestRunnerTest.dart
index 7493dff3a2a4eae3b5899d7ec7b44ba075b0e6b5..fb4a42607d04d4c7ec891b5c50b5ad8608e5da20 100644
--- a/tests/standalone/src/TestRunnerTest.dart
+++ b/tests/standalone/src/TestRunnerTest.dart
@@ -38,6 +38,12 @@ class TestController {
}
TestCase MakeTestCase(String testName, List<String> expectations) {
+ String test_path = "tests/standalone/src/${testName}.dart";
+ // Working directory may be dart/runtime rather than dart.
+ if (!new File(test_path).existsSync()) {
+ test_path = "../tests/standalone/src/${testName}.dart";
+ }
+
return new TestCase(getDartShellFileName(), <String>[
"--ignore-unrecognized-flags",
"--enable_type_checks",
@@ -62,18 +68,18 @@ String getProcessTestFileName() {
}
void main() {
- new RunningProcess(MakeTestCase("PassTest", [PASS]), 30).start();
- new RunningProcess(MakeTestCase("FailTest", [FAIL]), 30).start();
- new RunningProcess(MakeTestCase("TimeoutTest", [TIMEOUT]), 30).start();
+ new RunningProcess(MakeTestCase("PassTest", [PASS]), 10).start();
+ new RunningProcess(MakeTestCase("FailTest", [FAIL]), 10).start();
+ new RunningProcess(MakeTestCase("TimeoutTest", [TIMEOUT]), 10).start();
new RunningProcess(new TestCase(getProcessTestFileName(),
const ["0", "0", "1", "1"],
TestController.processCompletedTest,
new Set<String>.from([CRASH])),
- 30).start();
+ 10).start();
Expect.equals(4, TestController.numTests);
// Throw must be from body of start() function for this test to work.
Expect.throws(
- new RunningProcess(MakeTestCase("PassTest", [SKIP]), 30).start);
+ new RunningProcess(MakeTestCase("PassTest", [SKIP]), 10).start);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698