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

Commit a5076dc

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 a5076dc

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
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

tools/gn

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,6 @@ def to_gn_args(args):
261261

262262
gn_args['full_dart_sdk'] = args.full_dart_sdk
263263

264-
if args.enable_unittests:
265-
gn_args['enable_unittests'] = True
266-
if args.no_enable_unittests:
267-
gn_args['enable_unittests'] = False
268-
269264
# Skia GN args.
270265
gn_args['skia_enable_flutter_defines'
271266
] = True # Enable Flutter API guards in Skia.

0 commit comments

Comments
 (0)