[devicelab] migrate new gallery benchmarks to local copy. (#143545)

This is the next step in archiving flutter/gallery - move devicelab tests to use the local copy.
This commit is contained in:
Jonah Williams
2024-02-15 14:32:38 -08:00
committed by GitHub
parent cef33536aa
commit 27cacca011
13 changed files with 52 additions and 166 deletions

View File

@@ -706,22 +706,6 @@ String jsonEncode(dynamic data) {
return '$jsonValue\n';
}
Future<void> getNewGallery(String revision, Directory galleryDir) async {
section('Get New Flutter Gallery!');
if (exists(galleryDir)) {
galleryDir.deleteSync(recursive: true);
}
await inDirectory<void>(galleryDir.parent, () async {
await exec('git', <String>['clone', 'https://github.com/flutter/gallery.git']);
});
await inDirectory<void>(galleryDir, () async {
await exec('git', <String>['checkout', revision]);
});
}
/// Splits [from] into lines and selects those that contain [pattern].
Iterable<String> grep(Pattern pattern, {required String from}) {
return from.split('\n').where((String line) {