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

Side by Side Diff: tools/testing/dart/test_runner.dart

Issue 8514003: tools/test.dart: Read test expectations from the status file, and pass them to the test runner. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Readdress comments. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/testing/dart/status_file_parser.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_runner"); 5 #library("test_runner");
6 6
7 7
8 #import("status_file_parser.dart"); 8 #import("status_file_parser.dart");
9 9
10 /** 10 /**
11 * Classes and methods for executing tests. 11 * Classes and methods for executing tests.
12 * 12 *
13 * This module includes: 13 * This module includes:
14 * - Managing parallel execution of tests, including timeout checks. 14 * - Managing parallel execution of tests, including timeout checks.
15 * - Evaluating the output of each test as pass/fail/crash/timeout. 15 * - Evaluating the output of each test as pass/fail/crash/timeout.
16 */ 16 */
17 17
18 // Possible outcomes of running a test.
19 final CRASH = "Crash";
20 final TIMEOUT = "Timeout";
21 final FAIL = "Fail";
22 final PASS = "Pass";
23 // An indication to skip the test. The caller is responsible for skipping it.
24 final SKIP = "Skip";
25
26 final int NO_TIMEOUT = 0; 18 final int NO_TIMEOUT = 0;
27 19
28 String getDartShellFileName() { 20 String getDartShellFileName() {
29 var names = ["out/Debug_ia32/dart_bin", 21 var names = ["out/Debug_ia32/dart_bin",
30 "out/Release_ia32/dart_bin", 22 "out/Release_ia32/dart_bin",
31 "xcodebuild/Debug_ia32/dart_bin", 23 "xcodebuild/Debug_ia32/dart_bin",
32 "xcodebuild/Release_ia32/dart_bin", 24 "xcodebuild/Release_ia32/dart_bin",
33 "Debug_ia32/dart_bin.exe", 25 "Debug_ia32/dart_bin.exe",
34 "Release_ia32/dart_bin.exe"]; 26 "Release_ia32/dart_bin.exe"];
35 for (var name in names) { 27 for (var name in names) {
(...skipping 15 matching lines...) Expand all
51 Function completedHandler; 43 Function completedHandler;
52 44
53 TestCase(this.displayName, this.executablePath, this.arguments, 45 TestCase(this.displayName, this.executablePath, this.arguments,
54 this.completedHandler, this.expectedOutcomes) { 46 this.completedHandler, this.expectedOutcomes) {
55 commandLine = executablePath; 47 commandLine = executablePath;
56 for (var arg in arguments) { 48 for (var arg in arguments) {
57 commandLine += " " + arg; 49 commandLine += " " + arg;
58 } 50 }
59 } 51 }
60 52
61 bool get isNegative() => false; 53 bool get isNegative() => displayName.contains("NegativeTest");
62 54
63 void completed() { completedHandler(this); } 55 void completed() { completedHandler(this); }
64 } 56 }
65 57
66 58
67 class TestOutput { 59 class TestOutput {
68 // The TestCase this is the output from. 60 // The TestCase this is the output from.
69 TestCase testCase; 61 TestCase testCase;
70 int exitCode; 62 int exitCode;
71 bool timedOut; 63 bool timedOut;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 new RunningProcess(test, 60).start(); 174 new RunningProcess(test, 60).start();
183 numProcesses++; 175 numProcesses++;
184 } 176 }
185 } 177 }
186 178
187 runTest(TestCase test) { 179 runTest(TestCase test) {
188 tests.add(test); 180 tests.add(test);
189 tryRunTest(); 181 tryRunTest();
190 } 182 }
191 } 183 }
OLDNEW
« no previous file with comments | « tools/testing/dart/status_file_parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698