Jason Simmons 9019beb02b Avoid a deadlock in the flutter_tester process when deleting the Impeller Vulkan context during shutdown (flutter/engine#46860)
The Impeller ContextVK contains a ConcurrentMessageLoop whose threads may invoke Dart timeline APIs.  The Dart APIs will create a thread-local object that will be deleted during thread shutdown.  Therefore, these threads should not outlive the engine/Shell and Dart VM.

Previously, RunTester held the ImpellerVulkanContextHolder on the stack, and its reference to the ContextVK would be dropped while exiting the function after the Shell is destructed.

This PR moves the contents of the tester's ImpellerVulkanContextHolder out of the instance on the stack and into a lambda owned by the Shell.

It also reenables the flutter_tester Impeller tests in the run_tests script.
2023-10-16 14:37:18 +00:00
..

Engine Testing

This directory contains the infrastructure for running tests on the engine, which are most often run by Flutter's continuous integration (CI) systems.

The tests themselves are located in other directories, closer to the source for each platform, language, and variant. For instance, macOS engine unit tests written in objective C are located in the same directory as the source files, but with a Test suffix added (e.g. "FlutterEngineTest.mm" holds the tests for "FlutterEngine.mm", and they are located in the same directory).

Testing the Engine locally

If you are working on the engine, you will want to be able to run tests locally.

In order to learn the details of how do that, please consult the Flutter Wiki page on the subject.