flutter/packages/flutter_tools/test
Andrew Kolos 8e4f704abc
[CLI tool] in flutter test, consider --flavor when validating the cached asset bundle (#150461)
Fixes https://github.com/flutter/flutter/issues/150296

**Context.** `flutter test` has its own code path for writing flutter app [assets](https://docs.flutter.dev/ui/assets/assets-and-images). https://github.com/flutter/flutter/pull/132985 introduced [flavor-conditional asset bundling ](https://docs.flutter.dev/deployment/flavors#conditionally-bundling-assets-based-on-flavor), which lets users control which assets get bundled based on `--flavor`. `--flavor` is supported in `flutter test`.

**Bug and fix.** `--flavor` isn't considered when deciding whether we need to rebuild this asset bundle:

5e448f4ce5/packages/flutter_tools/lib/src/commands/test.dart (L709)

This PR address this by writing the value of `--flavor` to a file in the build directory and checking that when validating the cached asset bundle.
2024-06-20 17:45:09 +00:00
..
android_preview_integration.shard Make flutter tool enforce >= kotlin 1.7.0, Gradle 7.0.2, and AGP 7.0.0, and Fix test failures blocking androidx upgrade (#149204) 2024-06-18 20:24:09 +00:00
commands.shard [CLI tool] in flutter test, consider --flavor when validating the cached asset bundle (#150461) 2024-06-20 17:45:09 +00:00
data make asset_test.dart tests not dependent on context (#141331) 2024-01-11 18:08:07 +00:00
general.shard Update old wiki links (#149544) 2024-06-17 17:26:08 +00:00
host_cross_arch.shard Add test for engine artifact framework permissions (#148786) 2024-06-18 17:07:21 +00:00
integration.shard Improve build time when using SwiftPM (#150052) 2024-06-12 21:16:07 +00:00
src Reland "if chains → switch expressions" (#148634) 2024-05-20 17:43:00 +00:00
web.shard Added missing code block language in docs (#147481) 2024-05-01 14:44:27 +00:00