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

Side by Side Diff: tools/migration/lib/src/migrate_statuses.dart

Issue 3009653002: Don't migrate status entries under a "[ $strong ]" header. (Closed)
Patch Set: Created 3 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'package:path/path.dart' as p; 5 import 'package:path/path.dart' as p;
6 6
7 import 'editable_status_file.dart'; 7 import 'editable_status_file.dart';
8 import 'fork.dart'; 8 import 'fork.dart';
9 import 'io.dart'; 9 import 'io.dart';
10 import 'log.dart'; 10 import 'log.dart';
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 if (possibleFiles.length > 1) { 100 if (possibleFiles.length > 1) {
101 // The condition matches multiple files, so the user is going to have to 101 // The condition matches multiple files, so the user is going to have to
102 // manually split it up into multiple sections first. 102 // manually split it up into multiple sections first.
103 // TODO(rnystrom): Would be good to automate this, though it requires 103 // TODO(rnystrom): Would be good to automate this, though it requires
104 // being able to work with condition expressions directly. 104 // being able to work with condition expressions directly.
105 var statusRelative = p.relative(fromFile, from: testRoot); 105 var statusRelative = p.relative(fromFile, from: testRoot);
106 _todoHeaders.putIfAbsent(statusRelative, () => new Set()).add(header); 106 _todoHeaders.putIfAbsent(statusRelative, () => new Set()).add(header);
107 return false; 107 return false;
108 } 108 }
109 109
110 // The main "_strong.status" files skip lots of tests that are or were not
111 // strong mode clean. We don't want to skip those tests in 2.0 -- we want
112 // to fix them. If we're in that header, do remove the entry from the old
113 // file, but don't add it to the new one.
114 if (header == "[ \$strong ]") return true;
115
110 // If the condition places it directly into one file, put it there. 116 // If the condition places it directly into one file, put it there.
111 if (possibleFiles.length == 1) { 117 if (possibleFiles.length == 1) {
112 destination = "${toDir}_${possibleFiles.single}.status"; 118 destination = "${toDir}_${possibleFiles.single}.status";
113 } 119 }
114 120
115 var sections = _files.putIfAbsent(p.join(toDir, destination), () => {}); 121 var sections = _files.putIfAbsent(p.join(toDir, destination), () => {});
116 122
117 var entries = sections.putIfAbsent(header, () => []); 123 var entries = sections.putIfAbsent(header, () => []);
118 entries.add(entry); 124 entries.add(entry);
119 return true; 125 return true;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 break; 207 break;
202 } 208 }
203 } 209 }
204 210
205 if (!found) { 211 if (!found) {
206 // This section doesn't exist in the status file, so add it. 212 // This section doesn't exist in the status file, so add it.
207 editable.append(header, entries[header]); 213 editable.append(header, entries[header]);
208 } 214 }
209 } 215 }
210 } 216 }
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