Add flutter update packages to some tests. (#75530)
* Add flutter update packages to some tests. Analyzer_benchmark and flutter_test_performance require to pub get multiple directories. Rather than delegating the recipes to run flutter update-packages we explicitly running on tests that need it. Bug: https://github.com/flutter/flutter/issues/75524 * Add pub get directly on the analyis classes. * Run flutter get in dev/tools. * Fix directory path. * Add more dependency directories. * Fix typo. * Add more dependencies. * Add stocks dependency. * Fix paths to some apps. * Add more dependencies. * Complete dependencies definition. * More analysis dependencies. * Add examples dependencies. * Dev tool dependencies. * Use update-packages for analyzer benchmark.
This commit is contained in:
@@ -101,11 +101,20 @@ Future<int> runTest({bool coverage = false, bool noPub = false}) async {
|
||||
return clock.elapsedMilliseconds;
|
||||
}
|
||||
|
||||
Future<void> pubGetDependencies(List<Directory> directories) async {
|
||||
for (final Directory directory in directories) {
|
||||
await inDirectory<void>(directory, () async {
|
||||
await flutter('pub', options: <String>['get']);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void main() {
|
||||
task(() async {
|
||||
final File nodeSourceFile = File(path.join(
|
||||
flutterDirectory.path, 'packages', 'flutter', 'lib', 'src', 'foundation', 'node.dart',
|
||||
));
|
||||
await pubGetDependencies(<Directory>[Directory(path.join(flutterDirectory.path, 'dev', 'automated_tests')),]);
|
||||
final String originalSource = await nodeSourceFile.readAsString();
|
||||
try {
|
||||
await runTest(noPub: true); // first number is meaningless; could have had to build the tool, run pub get, have a cache, etc
|
||||
|
||||
Reference in New Issue
Block a user