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

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

Issue 11028023: Add firefox jsshell support in testing scripts. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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: tools/testing/dart/test_runner.dart
===================================================================
--- tools/testing/dart/test_runner.dart (revision 13209)
+++ tools/testing/dart/test_runner.dart (working copy)
@@ -32,10 +32,13 @@
/** Command line arguments to the executable. */
List<String> arguments;
+ /** Environment variables set when running the command */
+ Map<String, String> environment;
+
/** The actual command line that will be executed. */
String commandLine;
- Command(this.executable, this.arguments) {
+ Command(this.executable, this.arguments, [this.environment = const {}]) {
if (Platform.operatingSystem == 'windows') {
// Windows can't handle the first command if it is a .bat file or the like
// with the slashes going the other direction.
@@ -633,7 +636,8 @@
}
}
- VoidFunction makeReadHandler(StringInputStream source, List<String> destination) {
+ VoidFunction makeReadHandler(StringInputStream source,
+ List<String> destination) {
void handler () {
if (source.closed) return; // TODO(whesse): Remove when bug is fixed.
var line = source.readLine();
@@ -656,7 +660,11 @@
void runCommand(Command command,
void exitHandler(int exitCode)) {
- process = Process.start(command.executable, command.arguments);
+ ProcessOptions options = new ProcessOptions();
+ options.environment = command.environment;
+ process = Process.start(command.executable,
+ command.arguments,
+ options);
process.onExit = exitHandler;
process.onError = (e) {
print("Error starting process:");

Powered by Google App Engine
This is Rietveld 408576698