Audit devicelab log streaming for nullability (#84820)
This commit is contained in:
@@ -615,10 +615,11 @@ class AndroidDevice extends Device {
|
||||
|
||||
@override
|
||||
Future<void> stopLoggingToSink() async {
|
||||
assert(_loggingProcess != null);
|
||||
_abortedLogging = true;
|
||||
_loggingProcess.kill();
|
||||
await _loggingProcess.exitCode;
|
||||
if (_loggingProcess != null) {
|
||||
_abortedLogging = true;
|
||||
_loggingProcess.kill();
|
||||
await _loggingProcess.exitCode;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -877,10 +878,11 @@ class IosDevice extends Device {
|
||||
|
||||
@override
|
||||
Future<void> stopLoggingToSink() async {
|
||||
assert(_loggingProcess != null);
|
||||
_abortedLogging = true;
|
||||
_loggingProcess.kill();
|
||||
await _loggingProcess.exitCode;
|
||||
if (_loggingProcess != null) {
|
||||
_abortedLogging = true;
|
||||
_loggingProcess.kill();
|
||||
await _loggingProcess.exitCode;
|
||||
}
|
||||
}
|
||||
|
||||
// The methods below are stubs for now. They will need to be expanded.
|
||||
|
||||
@@ -161,9 +161,8 @@ class _TaskRunner {
|
||||
result = await futureResult;
|
||||
} finally {
|
||||
if (device != null && device.canStreamLogs) {
|
||||
assert(sink != null);
|
||||
await device.stopLoggingToSink();
|
||||
await sink.close();
|
||||
await sink?.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import 'package:path/path.dart' as path;
|
||||
import 'package:process/process.dart';
|
||||
import 'package:stack_trace/stack_trace.dart';
|
||||
|
||||
import 'host_agent.dart';
|
||||
import 'task_result.dart';
|
||||
|
||||
/// Virtual current working directory, which affect functions, such as [exec].
|
||||
@@ -453,6 +454,11 @@ List<String> flutterCommandArgs(String command, List<String> options) {
|
||||
'--device-timeout',
|
||||
'5',
|
||||
],
|
||||
|
||||
if (command == 'drive' && hostAgent.dumpDirectory != null) ...<String>[
|
||||
'--screenshot',
|
||||
hostAgent.dumpDirectory.path,
|
||||
],
|
||||
if (localEngine != null) ...<String>['--local-engine', localEngine],
|
||||
if (localEngineSrcPath != null) ...<String>['--local-engine-src-path', localEngineSrcPath],
|
||||
...options,
|
||||
|
||||
Reference in New Issue
Block a user