Improve log output of keyboard_hot_restart_ios (#167834)

The keyboard hot restart test listens to `flutter run` logs and then
does an action. However, the test prints the `flutter run` log after the
action. This results in confusing logs.

For example:
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8716606099574306145/+/u/run_keyboard_hot_restart_ios/stdout

```
═══════════╡ ••• Launch app and wait for keyboard to be visible ••• ╞═══════════
...
stdout: Installing and launching...                                        37.2s
stdout: Syncing files to device swarming’s iPhone...                    


════╡ ••• Update the app to no longer force the keyboard to be visible ••• ╞════



════════════════════════╡ ••• Hot restart the app ••• ╞═════════════════════════



════════════╡ ••• Wait until the keyboard is no longer visible ••• ╞════════════

stdout: flutter: Keyboard is open
```

Here, the test waits until the keyboard is visible before moving onto
the test's next step. However, the log that triggers this action
(`flutter: Keyboard is open`) is printed after the action was taken
(`Update the app to no longer force the keyboard to be visible` and
`Wait until the keyboard is no longer visible`). This is confusing.

Follow-up to: https://github.com/flutter/flutter/pull/167013
Part of: https://github.com/flutter/flutter/issues/10713
This commit is contained in:
Loïc Sharma 2025-04-25 14:39:52 -07:00 committed by GitHub
parent 0f1fb96211
commit b65ff54de2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -133,8 +133,8 @@ Future<int> runApp({
final Completer<void> stderrDone = Completer<void>();
void onStdout(String line) {
onLine(line, process);
print('stdout: $line');
onLine(line, process);
}
process.stdout