Skip to content

[flutter_plugin_tools] Change GoogleTest tooling to build unit tests in native-test #89303

@stuartmorgan-g

Description

@stuartmorgan-g

The behavior of the new Windows and Linux support for GoogleTest binaries in native-test is based on the fact that the flutter build step will also build the unit test binaries, so it can just run them. This is in contrast to iOS/macOS/Android, where the command the tool uses to run the unit tests also builds them.

This is mostly† fine for CI, but will not be good for local use; it means that the unit-test-driven development cycle won't be "re-run the unit tests" on Windows and Linux, but "run a build, then re-run the unit tests". Best case, that's an extra command that's doing a lot of extra work to build the whole app (unless someone looks at the implementation details and finds the ninja command to run), and worst case it's frustration from not understanding why a change someone just made isn't fixing the unit test they expected it to (because they are actually running a stale test binary).

† Because it's using the existing build artifacts, and they are release, we're running release unit tests. On other platforms we run debug unit tests, which makes more sense.

Metadata

Metadata

Labels

P1High-priority issues at the top of the work lista: desktopRunning on desktopp: toolingAffects the flutter_plugin_tools packagepackageflutter/packages repository. See also p: labels.platform-linuxBuilding on or for Linux specificallyplatform-windowsBuilding on or for Windows specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions