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

Side by Side Diff: tools/testing/dart/test_runner.dart

Issue 909603003: Include environment overrides when building repro command. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /** 5 /**
6 * Classes and methods for executing tests. 6 * Classes and methods for executing tests.
7 * 7 *
8 * This module includes: 8 * This module includes:
9 * - Managing parallel execution of tests, including timeout checks. 9 * - Managing parallel execution of tests, including timeout checks.
10 * - Evaluating the output of each test as pass/fail/crash/timeout. 10 * - Evaluating the output of each test as pass/fail/crash/timeout.
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } 121 }
122 122
123 bool _equal(ProcessCommand other) => 123 bool _equal(ProcessCommand other) =>
124 super._equal(other) && 124 super._equal(other) &&
125 executable == other.executable && 125 executable == other.executable &&
126 deepJsonCompare(arguments, other.arguments) && 126 deepJsonCompare(arguments, other.arguments) &&
127 workingDirectory == other.workingDirectory && 127 workingDirectory == other.workingDirectory &&
128 deepJsonCompare(environmentOverrides, other.environmentOverrides); 128 deepJsonCompare(environmentOverrides, other.environmentOverrides);
129 129
130 String get reproductionCommand { 130 String get reproductionCommand {
131 var env = new StringBuffer();
132 environmentOverrides.forEach((key, value) =>
133 (io.Platform.operatingSystem == 'windows') ?
134 env.write('set $key=${escapeCommandLineArgument(value)} & ') :
135 env.write('$key=${escapeCommandLineArgument(value)} '));
131 var command = ([executable]..addAll(arguments)) 136 var command = ([executable]..addAll(arguments))
132 .map(escapeCommandLineArgument).join(' '); 137 .map(escapeCommandLineArgument).join(' ');
133 if (workingDirectory != null) { 138 if (workingDirectory != null) {
134 command = "$command (working directory: $workingDirectory)"; 139 command = "$command (working directory: $workingDirectory)";
135 } 140 }
136 return command; 141 return "$env$command";
137 } 142 }
138 143
139 Future<bool> get outputIsUpToDate => new Future.value(false); 144 Future<bool> get outputIsUpToDate => new Future.value(false);
140 } 145 }
141 146
142 class CompilationCommand extends ProcessCommand { 147 class CompilationCommand extends ProcessCommand {
143 final String _outputFile; 148 final String _outputFile;
144 final bool _neverSkipCompilation; 149 final bool _neverSkipCompilation;
145 final List<Uri> _bootstrapDependencies; 150 final List<Uri> _bootstrapDependencies;
146 151
(...skipping 2808 matching lines...) Expand 10 before | Expand all | Expand 10 after
2955 } 2960 }
2956 } 2961 }
2957 2962
2958 void eventAllTestsDone() { 2963 void eventAllTestsDone() {
2959 for (var listener in _eventListener) { 2964 for (var listener in _eventListener) {
2960 listener.allDone(); 2965 listener.allDone();
2961 } 2966 }
2962 _allDone(); 2967 _allDone();
2963 } 2968 }
2964 } 2969 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698