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

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

Issue 3007583002: Don't print "Necessary status file updates:" if there are none. (Closed)
Patch Set: Created 3 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_progress.dart
diff --git a/tools/testing/dart/test_progress.dart b/tools/testing/dart/test_progress.dart
index f03c98a19cf4151fe144c5bfc3d44cdd09a7b640..ee5deaf86d32293e693440ae4033cb5b966330cc 100644
--- a/tools/testing/dart/test_progress.dart
+++ b/tools/testing/dart/test_progress.dart
@@ -338,30 +338,32 @@ class StatusFileUpdatePrinter extends EventListener {
}
void _printFailureSummary() {
- var groupedStatuses = new Map<String, List<String>>();
- statusToConfigs.forEach((String status, List<String> configs) {
- var runtimeToConfiguration = new Map<String, List<String>>();
- for (String config in configs) {
- String runtime = _extractRuntime(config);
- var runtimeConfigs =
- runtimeToConfiguration.putIfAbsent(runtime, () => <String>[]);
- runtimeConfigs.add(config);
+ var groupedStatuses = <String, List<String>>{};
+ statusToConfigs.forEach((status, configs) {
+ var runtimeToConfiguration = <String, List<String>>{};
+ for (var config in configs) {
+ var runtime = _extractRuntime(config);
+ runtimeToConfiguration
+ .putIfAbsent(runtime, () => <String>[])
+ .add(config);
}
- runtimeToConfiguration
- .forEach((String runtime, List<String> runtimeConfigs) {
+
+ runtimeToConfiguration.forEach((runtime, runtimeConfigs) {
runtimeConfigs.sort((a, b) => a.compareTo(b));
- List<String> statuses = groupedStatuses.putIfAbsent(
+ var statuses = groupedStatuses.putIfAbsent(
'$runtime: $runtimeConfigs', () => <String>[]);
statuses.add(status);
});
});
+ if (groupedStatuses.isEmpty) return;
+
print('\n\nNecessary status file updates:');
groupedStatuses.forEach((String config, List<String> statuses) {
print('');
print('$config:');
statuses.sort((a, b) => a.compareTo(b));
- for (String status in statuses) {
+ for (var status in statuses) {
print(' $status');
}
});
« 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