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

Side by Side Diff: dart/tests/standalone/io/test_runner_test.dart

Issue 118783003: Command class hieracy refactoring, environmentOverride extraction (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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
OLDNEW
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 enqueueTestCase(testCaseFail); 75 enqueueTestCase(testCaseFail);
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.getProcessCommand(
86 'custom', Platform.executable, [Platform.script.toFilePath(), name], 86 'custom', Platform.executable, [Platform.script.toFilePath(), name],
87 'ReleaseIA32'); 87 {});
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.getProcessCommand(
93 'custom_crash', getProcessTestFileName(), ["0", "0", "1", "1"], 93 'custom_crash', getProcessTestFileName(), ["0", "0", "1", "1"],
94 'ReleaseIA32'); 94 {});
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.
97 // The test loads a new executable, which may sometimes take a long time. 97 // The test loads a new executable, which may sometimes take a long time.
98 // It involves a wait on the VM event loop, and possible system 98 // It involves a wait on the VM event loop, and possible system
99 // delays. 99 // delays.
100 return _makeTestCase(name, LONG_TIMEOUT, crashCommand, expectations); 100 return _makeTestCase(name, LONG_TIMEOUT, crashCommand, expectations);
101 } 101 }
102 102
103 _makeTestCase(name, timeout, command, expectations) { 103 _makeTestCase(name, timeout, command, expectations) {
104 var configuration = new TestOptionsParser() 104 var configuration = new TestOptionsParser()
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 break; 141 break;
142 case 'timeout': 142 case 'timeout':
143 // This process should be killed by the test after DEFAULT_TIMEOUT 143 // This process should be killed by the test after DEFAULT_TIMEOUT
144 new Timer(new Duration(hours: 42), (){ }); 144 new Timer(new Duration(hours: 42), (){ });
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 }
OLDNEW
« no previous file with comments | « dart/tests/standalone/io/skipping_dart2js_compilations_test.dart ('k') | dart/tools/testing/dart/co19_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698