Add performance tests for the new gallery (#55181)

This commit is contained in:
liyuqian
2020-04-22 20:03:01 -07:00
committed by GitHub
parent 8d6187fc75
commit a091206ed1
4 changed files with 74 additions and 0 deletions

View File

@@ -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,