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

Unified Diff: tests/standalone/io/test_runner_test.dart

Issue 21001003: test.py: First step towards support of caching dart2js compilations across runtimes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 months 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
Index: tests/standalone/io/test_runner_test.dart
diff --git a/tests/standalone/io/test_runner_test.dart b/tests/standalone/io/test_runner_test.dart
index d07558aaec936a88ad422bce429c2989a63c30ef..864a6607415c76316d72fff9fa98f0e3a81a8f37 100644
--- a/tests/standalone/io/test_runner_test.dart
+++ b/tests/standalone/io/test_runner_test.dart
@@ -8,6 +8,7 @@ import "dart:async";
import "dart:utf";
import "../../../tools/testing/dart/test_runner.dart";
import "../../../tools/testing/dart/test_suite.dart";
+import "../../../tools/testing/dart/test_progress.dart" as progress;
import "../../../tools/testing/dart/status_file_parser.dart";
import "../../../tools/testing/dart/test_options.dart";
import "process_test_util.dart";
@@ -22,13 +23,12 @@ class TestController {
// Used as TestCase.completedCallback.
static processCompletedTest(TestCase testCase) {
numCompletedTests++;
- CommandOutput output = testCase.lastCommandOutput;
if (testCase.displayName == "fail-unexpected") {
- if (!output.unexpectedOutput) {
+ if (!testCase.unexpectedOutput) {
throw "Expected fail-unexpected";
}
} else {
- if (output.unexpectedOutput) {
+ if (testCase.unexpectedOutput) {
throw "Unexpected fail";
}
}
@@ -71,16 +71,16 @@ class CustomTestSuite extends TestSuite {
}
TestCase _makeNormalTestCase(name, expectations) {
- var command = new Command('custom',
- Platform.executable,
- [Platform.script, name]);
+ var command = CommandBuilder.instance.getCommand(
+ 'custom', Platform.executable, [Platform.script, name],
+ 'ReleaseIA32');
return _makeTestCase(name, DEFAULT_TIMEOUT, command, expectations);
}
_makeCrashTestCase(name, expectations) {
ricow1 2013/08/01 18:23:52 where do call this from?
kustermann 2013/08/05 07:29:17 25 lines above.
- var crashCommand = new Command('custom_crash',
- getProcessTestFileName(),
- ["0", "0", "1", "1"]);
+ var crashCommand = CommandBuilder.instance.getCommand(
+ 'custom_crash', getProcessTestFileName(), ["0", "0", "1", "1"],
+ 'ReleaseIA32');
// The crash test sometimes times out. Run it with a large timeout
// to help diagnose the delay.
// The test loads a new executable, which may sometimes take a long time.
@@ -95,7 +95,6 @@ class CustomTestSuite extends TestSuite {
return new TestCase(name,
[command],
configuration,
- TestController.processCompletedTest,
new Set<String>.from(expectations));
}
}
@@ -103,8 +102,15 @@ class CustomTestSuite extends TestSuite {
void testProcessQueue() {
var maxProcesses = 2;
var maxBrowserProcesses = maxProcesses;
- new ProcessQueue(maxProcesses, maxBrowserProcesses,
- new DateTime.now(), [new CustomTestSuite()], [], TestController.finished);
+ new ProcessQueue({}, maxProcesses, maxBrowserProcesses,
+ new DateTime.now(), [new CustomTestSuite()],
+ [new EventListener()], TestController.finished);
+}
+
+class EventListener extends progress.EventListener{
+ void done(TestCase test) {
+ TestController.processCompletedTest(test);
+ }
}
void main() {

Powered by Google App Engine
This is Rietveld 408576698