[devicelab] update hostonly tests to use flutter directly or precache deps (#68487)

Fixes #67370

By running most of these executions through flutter, we get the benefit of the flutter error handling and precaching. IN the test where this is not feasible, call pre-cache directly.
This commit is contained in:
Jonah Williams
2020-10-19 13:01:50 -07:00
committed by GitHub
parent c706abf075
commit e8dc7a2e17
6 changed files with 209 additions and 45 deletions

View File

@@ -463,6 +463,16 @@ Future<String> evalFlutter(String command, {
canFail: canFail, environment: environment, stderr: stderr);
}
Future<ProcessResult> executeFlutter(String command, {
List<String> options = const <String>[],
}) async {
final List<String> args = flutterCommandArgs(command, options);
return _processManager.run(
<String>[path.join(flutterDirectory.path, 'bin', 'flutter'), ...args],
workingDirectory: cwd,
);
}
String get dartBin =>
path.join(flutterDirectory.path, 'bin', 'cache', 'dart-sdk', 'bin', 'dart');