Add temporary debug prints to identify devicelab failures (#19093)

This commit is contained in:
Danny Tuppeny
2018-07-05 14:16:44 +01:00
committed by GitHub
parent e1d396d5ca
commit edc16473bf

View File

@@ -128,8 +128,11 @@ Future<Map<String, double>> _readJsonResults(Process process) {
process.kill(ProcessSignal.SIGINT); // flutter run doesn't quit automatically
final String jsonOutput = jsonBuf.toString();
try {
print('[DEBUG:DANTUP] Completing successfully');
completer.complete(json.decode(jsonOutput));
print('[DEBUG:DANTUP] (done)');
} catch (ex) {
print('[DEBUG:DANTUP] Decoding JSON failed ($ex). JSON string was: $jsonOutput');
completer.completeError('Decoding JSON failed ($ex). JSON string was: $jsonOutput');
}
return;
@@ -145,6 +148,7 @@ Future<Map<String, double>> _readJsonResults(Process process) {
stderrSub.cancel(),
]);
if (!processWasKilledIntentionally && code != 0) {
print('[DEBUG:DANTUP] Completing with failure due to exit code=$code');
completer.completeError('flutter run failed: exit code=$code');
}
});