Devicelab tests (Chrome run, Web compile) for New Flutter Gallery (#53096)

This commit is contained in:
Tianguang
2020-04-21 20:48:03 +02:00
committed by GitHub
parent d8f353af5b
commit fbf4fa0a05
5 changed files with 247 additions and 47 deletions

View File

@@ -676,3 +676,18 @@ void checkFileContains(List<Pattern> patterns, String filePath) {
}
}
}
/// Clones a git repository.
///
/// Removes the directory [path], then clones the git repository
/// specified by [repo] to the directory [path].
Future<int> gitClone({String path, String repo}) async {
rmTree(Directory(path));
await Directory(path).create(recursive: true);
return await inDirectory<int>(
path,
() => exec('git', <String>['clone', repo]),
);
}