OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |