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

Unified Diff: dart/tools/testing/dart/test_suite.dart

Issue 10993048: Always fail if a process failed to launch. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 8 years, 3 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
« no previous file with comments | « dart/tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tools/testing/dart/test_suite.dart
diff --git a/dart/tools/testing/dart/test_suite.dart b/dart/tools/testing/dart/test_suite.dart
index bfe6cb63b3449dbaebd66910e80f2eb0f602ebc6..ad77213002a216f7d88704334ad9f9cae3e9ec9e 100644
--- a/dart/tools/testing/dart/test_suite.dart
+++ b/dart/tools/testing/dart/test_suite.dart
@@ -443,9 +443,7 @@ class StandardTestSuite implements TestSuite {
var commands = [];
var command = optionsFromFile['extraCommand'];
var args = optionsFromFile['extraCommandArgs'];
- if (command != null) {
- commands.add(new Command(command, args));
- }
+ addExtraCommand(command, args, commands);
List _append(list1,list2) => []..addAll(list1)..addAll(list2);
@@ -511,6 +509,18 @@ class StandardTestSuite implements TestSuite {
}
}
+ void addExtraCommand(String command, List<String> arguments, List commands) {
+ if (command == null) return;
+ // As a special case, a command of "dart" should run with the
+ // dart VM that we are testing.
+ if (command == 'dart') {
+ command = TestUtils.vmFileName(configuration);
+ }
+ arguments =
+ arguments.map((arg)=>arg.replaceAll(r"$dartDir", dartDir.toString()));
+ commands.add(new Command(command, arguments));
+ }
+
CreateTest makeTestCaseCreator(Map optionsFromFile) {
return (Path filePath,
bool isNegative,
@@ -688,16 +698,8 @@ class StandardTestSuite implements TestSuite {
}
var extraCommand = optionsFromFile['extraCommand'];
- if (extraCommand != null) {
- var args = optionsFromFile['extraCommandArgs'];
- // As a special case, a command of "dart" should run with the
- // dart VM that we are testing.
- if (extraCommand == 'dart') {
- extraCommand = TestUtils.vmFileName(configuration);
- }
- args= args.map((arg)=>arg.replaceAll(r"$dartDir", dartDir.toString()));
- commands.add(new Command(extraCommand, args));
- }
+ var args = optionsFromFile['extraCommandArgs'];
+ addExtraCommand(extraCommand, args, commands);
// Construct the command that executes the browser test
List<String> args;
« no previous file with comments | « dart/tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698