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

Unified Diff: pkg/compiler/tool/status_files/update_from_log.dart

Issue 2996543002: add error message as a comment on the logs (Closed)
Patch Set: only update script 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 | « pkg/compiler/tool/status_files/record.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/tool/status_files/update_from_log.dart
diff --git a/pkg/compiler/tool/status_files/update_from_log.dart b/pkg/compiler/tool/status_files/update_from_log.dart
index 91eb4aaebbd4b16af7b088c56926870a7debdf4f..08a119da5f153f7ccf04f069342cba459c1eef76 100644
--- a/pkg/compiler/tool/status_files/update_from_log.dart
+++ b/pkg/compiler/tool/status_files/update_from_log.dart
@@ -83,8 +83,9 @@ void updateLogs(String mode, String log) {
class ExistingEntry {
final String test;
final String status;
+ final bool hasComment;
- ExistingEntry(this.test, this.status);
+ ExistingEntry(this.test, this.status, this.hasComment);
static parse(String line) {
var colonIndex = line.indexOf(':');
@@ -94,7 +95,7 @@ class ExistingEntry {
if (commentIndex != -1) {
status = status.substring(0, commentIndex);
}
- return new ExistingEntry(test, status);
+ return new ExistingEntry(test, status, commentIndex != -1);
}
}
@@ -133,7 +134,8 @@ class ConfigurationInSuiteSection {
var newContents = new StringBuffer();
newContents.write(_contents.substring(0, _begin));
addFromRecord(Record record) {
- newContents.writeln('${record.test}: ${record.actual}');
+ var comment = record.reason != null ? ' # ${record.reason}' : '';
+ newContents.writeln('${record.test}: ${record.actual}$comment');
}
int i = 0, j = 0;
@@ -162,9 +164,14 @@ class ConfigurationInSuiteSection {
}
j++;
} else if (existing.status == record.actual) {
- // This also should only happen if the patching has already been done.
- // We don't complain to make this script idempotent.
- newContents.writeln(existingLine);
+ if (!existing.hasComment && record.reason != null) {
+ addFromRecord(record);
+ changes++;
+ } else {
+ // This also should only happen if the patching has already been done.
+ // We don't complain to make this script idempotent.
+ newContents.writeln(existingLine);
+ }
ignored++;
i++;
j++;
« no previous file with comments | « pkg/compiler/tool/status_files/record.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698