Unverified Commit 7ec50ddd authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[devicelab] Explicitly print stack trace from error in android attach test (#55981)

parent 534b0608
...@@ -57,7 +57,9 @@ Future<void> testReload(Process process, { Future<void> Function() onListening } ...@@ -57,7 +57,9 @@ Future<void> testReload(Process process, { Future<void> Function() onListening }
event, event,
process.exitCode, process.exitCode,
// Keep the test from running for 15 minutes if it gets stuck. // Keep the test from running for 15 minutes if it gets stuck.
Future<void>.delayed(const Duration(seconds: 10)), Future<void>.delayed(const Duration(seconds: 10)).then<void>((void _) {
throw StateError('eventOrExit timed out');
}),
]); ]);
} }
...@@ -71,10 +73,12 @@ Future<void> testReload(Process process, { Future<void> Function() onListening } ...@@ -71,10 +73,12 @@ Future<void> testReload(Process process, { Future<void> Function() onListening }
print('run:stdin: r'); print('run:stdin: r');
await process.stdin.flush(); await process.stdin.flush();
await eventOrExit(reloaded.future); await eventOrExit(reloaded.future);
process.stdin.write('R'); process.stdin.write('R');
print('run:stdin: R'); print('run:stdin: R');
await process.stdin.flush(); await process.stdin.flush();
await eventOrExit(restarted.future); await eventOrExit(restarted.future);
process.stdin.write('q'); process.stdin.write('q');
print('run:stdin: q'); print('run:stdin: q');
await process.stdin.flush(); await process.stdin.flush();
...@@ -168,6 +172,9 @@ void main() { ...@@ -168,6 +172,9 @@ void main() {
); );
// Verify that it can discover the observatory port from past logs. // Verify that it can discover the observatory port from past logs.
await testReload(attachProcess); await testReload(attachProcess);
} catch (err, st) {
print('Uncaught exception: $err\n$st');
rethrow;
} finally { } finally {
section('Uninstalling'); section('Uninstalling');
await device.adb(<String>['uninstall', kAppId]); await device.adb(<String>['uninstall', kAppId]);
......
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