mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
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.
This commit is contained in:
parent
6d7ecab25c
commit
eab5cd9853
@ -249,7 +249,8 @@ Future<Null> _verifyNoTestPackageImports(String workingDirectory) async {
|
||||
})
|
||||
.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 @@ Future<Null> _verifyNoTestPackageImports(String workingDirectory) async {
|
||||
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/') ||
|
||||
|
Loading…
Reference in New Issue
Block a user