flutter/packages/flutter_tools/lib
Matan Lurey c5379557b3
Terminate the test device if the flutter tool is signal-killed. (#159115)
Closes https://github.com/flutter/flutter/issues/20949.

Signals (such as SIGTERM or SIGKILL) end up flowing through
`exitWithHooks`, which in turn, after running hooks, call `exit().` That
means, as a result, any `try { } finally { }` guarded execution may
_not_ run, which happens to also be how `flutter_tester` instances are
cleaned up if they have not terminated.

This PR adds in-progress `flutter_tester` runs (or any platform
`flutter_platform` supports) to the shutdown hooks, guaranteeing that
the finalizers (which in turn, kill the process) are _always_ executed
as long as either the test completes, _or_ `exitWithHooks` is called.

The existing integration tests (`integration.shard/test_test.dart`)
still pass as well.
2024-11-19 16:10:32 +00:00
..
src Terminate the test device if the flutter tool is signal-killed. (#159115) 2024-11-19 16:10:32 +00:00
executable.dart [native assets] Rewrite install names for relocated native libraries (#153054) 2024-08-29 14:51:23 +00:00
runner.dart Handle ProcessExceptions due to git missing on the host (#154445) 2024-09-09 20:47:05 +00:00