| Index: test/io.dart
|
| diff --git a/test/io.dart b/test/io.dart
|
| index 09bd31df2c4de4a59f98d13dbd3b560aded397e4..7ba9eb04fe78aa819f705815fee1bb2c05713f33 100644
|
| --- a/test/io.dart
|
| +++ b/test/io.dart
|
| @@ -16,23 +16,29 @@ String _computePackageDir() =>
|
| p.dirname(p.dirname(_libraryPath(#unittest.test.io)));
|
|
|
| /// Runs the unittest executable with the package root set properly.
|
| -ProcessResult runUnittest(List<String> args, {String workingDirectory}) {
|
| +ProcessResult runUnittest(List<String> args, {String workingDirectory,
|
| + Map<String, String> environment}) {
|
| var allArgs = [
|
| p.join(packageDir, 'bin/unittest.dart'),
|
| "--package-root=${p.join(packageDir, 'packages')}"
|
| ]..addAll(args);
|
|
|
| + if (environment == null) environment = {};
|
| + environment.putIfAbsent("_UNITTEST_USE_COLOR", () => "false");
|
| +
|
| // TODO(nweiz): Use ScheduledProcess once it's compatible.
|
| - return runDart(allArgs, workingDirectory: workingDirectory);
|
| + return runDart(allArgs, workingDirectory: workingDirectory,
|
| + environment: environment);
|
| }
|
|
|
| /// Runs Dart.
|
| -ProcessResult runDart(List<String> args, {String workingDirectory}) {
|
| +ProcessResult runDart(List<String> args, {String workingDirectory,
|
| + Map<String, String> environment}) {
|
| var allArgs = Platform.executableArguments.toList()..addAll(args);
|
|
|
| // TODO(nweiz): Use ScheduledProcess once it's compatible.
|
| return Process.runSync(Platform.executable, allArgs,
|
| - workingDirectory: workingDirectory);
|
| + workingDirectory: workingDirectory, environment: environment);
|
| }
|
|
|
| /// Returns the path to the library named [libraryName].
|
|
|