Unverified Commit edc16473 authored by Danny Tuppeny's avatar Danny Tuppeny Committed by GitHub

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

parent e1d396d5
...@@ -128,8 +128,11 @@ Future<Map<String, double>> _readJsonResults(Process process) { ...@@ -128,8 +128,11 @@ Future<Map<String, double>> _readJsonResults(Process process) {
process.kill(ProcessSignal.SIGINT); // flutter run doesn't quit automatically process.kill(ProcessSignal.SIGINT); // flutter run doesn't quit automatically
final String jsonOutput = jsonBuf.toString(); final String jsonOutput = jsonBuf.toString();
try { try {
print('[DEBUG:DANTUP] Completing successfully');
completer.complete(json.decode(jsonOutput)); completer.complete(json.decode(jsonOutput));
print('[DEBUG:DANTUP] (done)');
} catch (ex) { } catch (ex) {
print('[DEBUG:DANTUP] Decoding JSON failed ($ex). JSON string was: $jsonOutput');
completer.completeError('Decoding JSON failed ($ex). JSON string was: $jsonOutput'); completer.completeError('Decoding JSON failed ($ex). JSON string was: $jsonOutput');
} }
return; return;
...@@ -145,6 +148,7 @@ Future<Map<String, double>> _readJsonResults(Process process) { ...@@ -145,6 +148,7 @@ Future<Map<String, double>> _readJsonResults(Process process) {
stderrSub.cancel(), stderrSub.cancel(),
]); ]);
if (!processWasKilledIntentionally && code != 0) { if (!processWasKilledIntentionally && code != 0) {
print('[DEBUG:DANTUP] Completing with failure due to exit code=$code');
completer.completeError('flutter run failed: exit code=$code'); completer.completeError('flutter run failed: exit code=$code');
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment