Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 72cb398

Browse files
committed
[macOS] Build unittests on all macOS host builds
Whether we're building an x64 or arm64 macOS host build, always build unit tests. Also removes the --enable-unittests gn config option since it was added specifically for macOS in #40242. Issue: flutter/flutter#124840
1 parent 4a3433f commit 72cb398

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

testing/testing.gni

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ import("//third_party/dart/sdk_args.gni")
1010
is_aot_test =
1111
flutter_runtime_mode == "profile" || flutter_runtime_mode == "release"
1212

13-
# Unit tests targets are only enabled for host machines and Fuchsia right now
13+
# Build unit tests when any of the following are true:
14+
# * host_toolchain: non-cross-compile, so we can run tests on the host.
15+
# * is_mac: arm64 builds can run x64 binaries.
16+
# * is_fuchsia: build unittests for testing on device.
1417
declare_args() {
15-
enable_unittests = current_toolchain == host_toolchain || is_fuchsia
18+
enable_unittests = current_toolchain == host_toolchain || is_fuchsia || is_mac
1619
}
1720

1821
# Creates a translation unit that defines the flutter::testing::GetFixturesPath

0 commit comments

Comments
 (0)