Fix analysis shard of dev/bots/test.dart so it works on Windows. (#21203)
Normalize file path to non-Windows so string path comparison works.
diff --git a/dev/bots/analyze.dart b/dev/bots/analyze.dart
index c0296c5..549787b 100644
--- a/dev/bots/analyze.dart
+++ b/dev/bots/analyze.dart
@@ -249,7 +249,8 @@
})
.map<String>((FileSystemEntity entity) {
final File file = entity;
- final String name = path.relative(file.path, from: workingDirectory);
+ final String name = Uri.file(path.relative(file.path,
+ from: workingDirectory)).toFilePath(windows: false);
if (name.startsWith('bin/cache') ||
name == 'dev/bots/test.dart' ||
name.startsWith('.pub-cache'))
@@ -266,7 +267,7 @@
return ' $name: Shim seems to be missing the expected import/export lines.';
}
final int count = 'package:test'.allMatches(data).length;
- if (file.path.contains('/test_driver/') ||
+ if (path.split(file.path).contains('test_driver') ||
name.startsWith('dev/missing_dependency_tests/') ||
name.startsWith('dev/automated_tests/') ||
name.startsWith('packages/flutter/test/engine/') ||