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

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

Issue 2344903002: Avoid error in testing script if environment is empty. (Closed)
Patch Set: Use null-aware operator instead. Created 4 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 unified diff | Download patch
« 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 bool _equal(ProcessCommand other) => 129 bool _equal(ProcessCommand other) =>
130 super._equal(other) && 130 super._equal(other) &&
131 executable == other.executable && 131 executable == other.executable &&
132 deepJsonCompare(arguments, other.arguments) && 132 deepJsonCompare(arguments, other.arguments) &&
133 workingDirectory == other.workingDirectory && 133 workingDirectory == other.workingDirectory &&
134 deepJsonCompare(environmentOverrides, other.environmentOverrides); 134 deepJsonCompare(environmentOverrides, other.environmentOverrides);
135 135
136 String get reproductionCommand { 136 String get reproductionCommand {
137 var env = new StringBuffer(); 137 var env = new StringBuffer();
138 environmentOverrides.forEach((key, value) => 138 environmentOverrides?.forEach((key, value) =>
139 (io.Platform.operatingSystem == 'windows') 139 (io.Platform.operatingSystem == 'windows')
140 ? env.write('set $key=${escapeCommandLineArgument(value)} & ') 140 ? env.write('set $key=${escapeCommandLineArgument(value)} & ')
141 : env.write('$key=${escapeCommandLineArgument(value)} ')); 141 : env.write('$key=${escapeCommandLineArgument(value)} '));
142 var command = ([executable]..addAll(arguments)) 142 var command = ([executable]..addAll(arguments))
143 .map(escapeCommandLineArgument) 143 .map(escapeCommandLineArgument)
144 .join(' '); 144 .join(' ');
145 if (workingDirectory != null) { 145 if (workingDirectory != null) {
146 command = "$command (working directory: $workingDirectory)"; 146 command = "$command (working directory: $workingDirectory)";
147 } 147 }
148 return "$env$command"; 148 return "$env$command";
(...skipping 2911 matching lines...) Expand 10 before | Expand all | Expand 10 after
3060 } 3060 }
3061 } 3061 }
3062 3062
3063 void eventAllTestsDone() { 3063 void eventAllTestsDone() {
3064 for (var listener in _eventListener) { 3064 for (var listener in _eventListener) {
3065 listener.allDone(); 3065 listener.allDone();
3066 } 3066 }
3067 _allDone(); 3067 _allDone();
3068 } 3068 }
3069 } 3069 }
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