Add performance tests for the new gallery (#55181)
This commit is contained in:
@@ -501,6 +501,22 @@ String jsonEncode(dynamic data) {
|
||||
return const JsonEncoder.withIndent(' ').convert(data) + '\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]);
|
||||
});
|
||||
}
|
||||
|
||||
void checkNotNull(Object o1,
|
||||
[Object o2 = 1,
|
||||
Object o3 = 1,
|
||||
|
||||
Reference in New Issue
Block a user