Unverified Commit c6ec84e9 authored by Zachary Anderson's avatar Zachary Anderson Committed by GitHub

[flutter_tools] Pull more arm64 artifacts on Apple Silicon (#110291)

parent ee8488e8
...@@ -377,7 +377,7 @@ class _MacOSUtils extends _PosixUtils { ...@@ -377,7 +377,7 @@ class _MacOSUtils extends _PosixUtils {
if (results.every((RunResult result) => result.exitCode == 0)) { if (results.every((RunResult result) => result.exitCode == 0)) {
String osName = getNameForHostPlatform(hostPlatform); String osName = getNameForHostPlatform(hostPlatform);
// If the script is running in Rosetta, "uname -m" will return x86_64. // If the script is running in Rosetta, "uname -m" will return x86_64.
if (hostPlatform == HostPlatform.darwin_arm && results[3].stdout.contains('x86_64')) { if (hostPlatform == HostPlatform.darwin_arm64 && results[3].stdout.contains('x86_64')) {
osName = '$osName (Rosetta)'; osName = '$osName (Rosetta)';
} }
_name = _name =
...@@ -415,7 +415,7 @@ class _MacOSUtils extends _PosixUtils { ...@@ -415,7 +415,7 @@ class _MacOSUtils extends _PosixUtils {
// On arm64 stdout is "sysctl hw.optional.arm64: 1" // On arm64 stdout is "sysctl hw.optional.arm64: 1"
// On x86 hw.optional.arm64 is unavailable and exits with 1. // On x86 hw.optional.arm64 is unavailable and exits with 1.
if (arm64Check.exitCode == 0 && arm64Check.stdout.trim().endsWith('1')) { if (arm64Check.exitCode == 0 && arm64Check.stdout.trim().endsWith('1')) {
_hostPlatform = HostPlatform.darwin_arm; _hostPlatform = HostPlatform.darwin_arm64;
} else { } else {
_hostPlatform = HostPlatform.darwin_x64; _hostPlatform = HostPlatform.darwin_x64;
} }
...@@ -604,7 +604,7 @@ String? findProjectRoot(FileSystem fileSystem, [ String? directory ]) { ...@@ -604,7 +604,7 @@ String? findProjectRoot(FileSystem fileSystem, [ String? directory ]) {
enum HostPlatform { enum HostPlatform {
darwin_x64, darwin_x64,
darwin_arm, darwin_arm64,
linux_x64, linux_x64,
linux_arm64, linux_arm64,
windows_x64, windows_x64,
...@@ -614,8 +614,8 @@ String getNameForHostPlatform(HostPlatform platform) { ...@@ -614,8 +614,8 @@ String getNameForHostPlatform(HostPlatform platform) {
switch (platform) { switch (platform) {
case HostPlatform.darwin_x64: case HostPlatform.darwin_x64:
return 'darwin-x64'; return 'darwin-x64';
case HostPlatform.darwin_arm: case HostPlatform.darwin_arm64:
return 'darwin-arm'; return 'darwin-arm64';
case HostPlatform.linux_x64: case HostPlatform.linux_x64:
return 'linux-x64'; return 'linux-x64';
case HostPlatform.linux_arm64: case HostPlatform.linux_arm64:
......
...@@ -696,7 +696,7 @@ TargetPlatform getTargetPlatformForName(String platform) { ...@@ -696,7 +696,7 @@ TargetPlatform getTargetPlatformForName(String platform) {
// For backward-compatibility and also for Tester, where it must match // For backward-compatibility and also for Tester, where it must match
// host platform name (HostPlatform.darwin_x64) // host platform name (HostPlatform.darwin_x64)
case 'darwin-x64': case 'darwin-x64':
case 'darwin-arm': case 'darwin-arm64':
return TargetPlatform.darwin; return TargetPlatform.darwin;
case 'linux-x64': case 'linux-x64':
return TargetPlatform.linux_x64; return TargetPlatform.linux_x64;
...@@ -1034,8 +1034,8 @@ String getNameForHostPlatformArch(HostPlatform platform) { ...@@ -1034,8 +1034,8 @@ String getNameForHostPlatformArch(HostPlatform platform) {
switch (platform) { switch (platform) {
case HostPlatform.darwin_x64: case HostPlatform.darwin_x64:
return 'x64'; return 'x64';
case HostPlatform.darwin_arm: case HostPlatform.darwin_arm64:
return 'arm'; return 'arm64';
case HostPlatform.linux_x64: case HostPlatform.linux_x64:
return 'x64'; return 'x64';
case HostPlatform.linux_arm64: case HostPlatform.linux_arm64:
......
...@@ -234,12 +234,12 @@ class FlutterSdk extends EngineCachedArtifact { ...@@ -234,12 +234,12 @@ class FlutterSdk extends EngineCachedArtifact {
if (cache.includeAllPlatforms) ...<List<String>>[ if (cache.includeAllPlatforms) ...<List<String>>[
<String>['windows-x64', 'windows-x64/artifacts.zip'], <String>['windows-x64', 'windows-x64/artifacts.zip'],
<String>['linux-$arch', 'linux-$arch/artifacts.zip'], <String>['linux-$arch', 'linux-$arch/artifacts.zip'],
<String>['darwin-x64', 'darwin-x64/artifacts.zip'], <String>['darwin-x64', 'darwin-$arch/artifacts.zip'],
] ]
else if (_platform.isWindows) else if (_platform.isWindows)
<String>['windows-x64', 'windows-x64/artifacts.zip'] <String>['windows-x64', 'windows-x64/artifacts.zip']
else if (_platform.isMacOS) else if (_platform.isMacOS)
<String>['darwin-x64', 'darwin-x64/artifacts.zip'] <String>['darwin-x64', 'darwin-$arch/artifacts.zip']
else if (_platform.isLinux) else if (_platform.isLinux)
<String>['linux-$arch', 'linux-$arch/artifacts.zip'], <String>['linux-$arch', 'linux-$arch/artifacts.zip'],
]; ];
...@@ -729,7 +729,7 @@ class FontSubsetArtifacts extends EngineCachedArtifact { ...@@ -729,7 +729,7 @@ class FontSubsetArtifacts extends EngineCachedArtifact {
// Currently only Linux supports both arm64 and x64. // Currently only Linux supports both arm64 and x64.
final String arch = cache.getHostPlatformArchName(); final String arch = cache.getHostPlatformArchName();
final Map<String, List<String>> artifacts = <String, List<String>> { final Map<String, List<String>> artifacts = <String, List<String>> {
'macos': <String>['darwin-x64', 'darwin-x64/$artifactName.zip'], 'macos': <String>['darwin-x64', 'darwin-$arch/$artifactName.zip'],
'linux': <String>['linux-$arch', 'linux-$arch/$artifactName.zip'], 'linux': <String>['linux-$arch', 'linux-$arch/$artifactName.zip'],
'windows': <String>['windows-x64', 'windows-x64/$artifactName.zip'], 'windows': <String>['windows-x64', 'windows-x64/$artifactName.zip'],
}; };
......
...@@ -161,7 +161,7 @@ class XcodeProjectInterpreter { ...@@ -161,7 +161,7 @@ class XcodeProjectInterpreter {
/// to run outside the x86 Rosetta translation, which may cause crashes. /// to run outside the x86 Rosetta translation, which may cause crashes.
List<String> xcrunCommand() { List<String> xcrunCommand() {
final List<String> xcrunCommand = <String>[]; final List<String> xcrunCommand = <String>[];
if (_operatingSystemUtils.hostPlatform == HostPlatform.darwin_arm) { if (_operatingSystemUtils.hostPlatform == HostPlatform.darwin_arm64) {
// Force Xcode commands to run outside Rosetta. // Force Xcode commands to run outside Rosetta.
xcrunCommand.addAll(<String>[ xcrunCommand.addAll(<String>[
'/usr/bin/arch', '/usr/bin/arch',
......
...@@ -362,7 +362,7 @@ class CocoaPods { ...@@ -362,7 +362,7 @@ class CocoaPods {
emphasis: true, emphasis: true,
); );
} else if ((stderr.contains('ffi_c.bundle') || stderr.contains('/ffi/')) && } else if ((stderr.contains('ffi_c.bundle') || stderr.contains('/ffi/')) &&
_operatingSystemUtils.hostPlatform == HostPlatform.darwin_arm) { _operatingSystemUtils.hostPlatform == HostPlatform.darwin_arm64) {
// https://github.com/flutter/flutter/issues/70796 // https://github.com/flutter/flutter/issues/70796
UsageEvent( UsageEvent(
'pod-install-failure', 'pod-install-failure',
......
...@@ -52,7 +52,7 @@ class MacOSDevice extends DesktopDevice { ...@@ -52,7 +52,7 @@ class MacOSDevice extends DesktopDevice {
@override @override
Future<String> get targetPlatformDisplayName async { Future<String> get targetPlatformDisplayName async {
if (_operatingSystemUtils.hostPlatform == HostPlatform.darwin_arm) { if (_operatingSystemUtils.hostPlatform == HostPlatform.darwin_arm64) {
return 'darwin-arm64'; return 'darwin-arm64';
} else { } else {
return 'darwin-x64'; return 'darwin-x64';
......
...@@ -47,11 +47,11 @@ class MacOSDesignedForIPadDevice extends DesktopDevice { ...@@ -47,11 +47,11 @@ class MacOSDesignedForIPadDevice extends DesktopDevice {
Future<TargetPlatform> get targetPlatform async => TargetPlatform.darwin; Future<TargetPlatform> get targetPlatform async => TargetPlatform.darwin;
@override @override
bool isSupported() => _operatingSystemUtils.hostPlatform == HostPlatform.darwin_arm; bool isSupported() => _operatingSystemUtils.hostPlatform == HostPlatform.darwin_arm64;
@override @override
bool isSupportedForProject(FlutterProject flutterProject) { bool isSupportedForProject(FlutterProject flutterProject) {
return flutterProject.ios.existsSync() && _operatingSystemUtils.hostPlatform == HostPlatform.darwin_arm; return flutterProject.ios.existsSync() && _operatingSystemUtils.hostPlatform == HostPlatform.darwin_arm64;
} }
@override @override
...@@ -119,7 +119,7 @@ class MacOSDesignedForIPadDevices extends PollingDeviceDiscovery { ...@@ -119,7 +119,7 @@ class MacOSDesignedForIPadDevices extends PollingDeviceDiscovery {
/// and discovery is allowed for this command. /// and discovery is allowed for this command.
@override @override
bool get canListAnything => bool get canListAnything =>
_iosWorkflow.canListDevices && _operatingSystemUtils.hostPlatform == HostPlatform.darwin_arm && allowDiscovery; _iosWorkflow.canListDevices && _operatingSystemUtils.hostPlatform == HostPlatform.darwin_arm64 && allowDiscovery;
/// Set to show ARM macOS as an iOS device target. /// Set to show ARM macOS as an iOS device target.
static bool allowDiscovery = false; static bool allowDiscovery = false;
......
...@@ -15,7 +15,6 @@ import 'package:stream_channel/stream_channel.dart'; ...@@ -15,7 +15,6 @@ import 'package:stream_channel/stream_channel.dart';
import '../base/file_system.dart'; import '../base/file_system.dart';
import '../base/io.dart'; import '../base/io.dart';
import '../base/logger.dart'; import '../base/logger.dart';
import '../base/os.dart';
import '../base/platform.dart'; import '../base/platform.dart';
import '../convert.dart'; import '../convert.dart';
import '../device.dart'; import '../device.dart';
...@@ -47,13 +46,7 @@ class FlutterTesterTestDevice extends TestDevice { ...@@ -47,13 +46,7 @@ class FlutterTesterTestDevice extends TestDevice {
}) : assert(shellPath != null), // Please provide the path to the shell in the SKY_SHELL environment variable. }) : assert(shellPath != null), // Please provide the path to the shell in the SKY_SHELL environment variable.
assert(!debuggingOptions.startPaused || enableObservatory), assert(!debuggingOptions.startPaused || enableObservatory),
_gotProcessObservatoryUri = enableObservatory _gotProcessObservatoryUri = enableObservatory
? Completer<Uri?>() : (Completer<Uri?>()..complete()), ? Completer<Uri?>() : (Completer<Uri?>()..complete());
_operatingSystemUtils = OperatingSystemUtils(
fileSystem: fileSystem,
logger: logger,
platform: platform,
processManager: processManager,
);
/// Used for logging to identify the test that is currently being executed. /// Used for logging to identify the test that is currently being executed.
final int id; final int id;
...@@ -77,7 +70,6 @@ class FlutterTesterTestDevice extends TestDevice { ...@@ -77,7 +70,6 @@ class FlutterTesterTestDevice extends TestDevice {
Process? _process; Process? _process;
HttpServer? _server; HttpServer? _server;
final OperatingSystemUtils _operatingSystemUtils;
/// Starts the device. /// Starts the device.
/// ///
...@@ -94,13 +86,6 @@ class FlutterTesterTestDevice extends TestDevice { ...@@ -94,13 +86,6 @@ class FlutterTesterTestDevice extends TestDevice {
_server = await bind(host, /*port*/ 0); _server = await bind(host, /*port*/ 0);
logger.printTrace('test $id: test harness socket server is running at port:${_server!.port}'); logger.printTrace('test $id: test harness socket server is running at port:${_server!.port}');
final List<String> command = <String>[ final List<String> command = <String>[
// Until an arm64 flutter tester binary is available, force to run in Rosetta
// to avoid "unexpectedly got a signal in sigtramp" crash.
// https://github.com/flutter/flutter/issues/88106
if (_operatingSystemUtils.hostPlatform == HostPlatform.darwin_arm) ...<String>[
'/usr/bin/arch',
'-x86_64',
],
shellPath, shellPath,
if (enableObservatory) ...<String>[ if (enableObservatory) ...<String>[
// Some systems drive the _FlutterPlatform class in an unusual way, where // Some systems drive the _FlutterPlatform class in an unusual way, where
......
...@@ -240,7 +240,7 @@ class ChromiumLauncher { ...@@ -240,7 +240,7 @@ class ChromiumLauncher {
} }
Future<Process?> _spawnChromiumProcess(List<String> args, String chromeExecutable) async { Future<Process?> _spawnChromiumProcess(List<String> args, String chromeExecutable) async {
if (_operatingSystemUtils.hostPlatform == HostPlatform.darwin_arm) { if (_operatingSystemUtils.hostPlatform == HostPlatform.darwin_arm64) {
final ProcessResult result = _processManager.runSync(<String>['file', chromeExecutable]); final ProcessResult result = _processManager.runSync(<String>['file', chromeExecutable]);
// Check if ARM Chrome is installed. // Check if ARM Chrome is installed.
// Mach-O 64-bit executable arm64 // Mach-O 64-bit executable arm64
......
...@@ -219,7 +219,7 @@ void main() { ...@@ -219,7 +219,7 @@ void main() {
final OperatingSystemUtils utils = final OperatingSystemUtils utils =
createOSUtils(FakePlatform(operatingSystem: 'macos')); createOSUtils(FakePlatform(operatingSystem: 'macos'));
expect(utils.hostPlatform, HostPlatform.darwin_arm); expect(utils.hostPlatform, HostPlatform.darwin_arm64);
}); });
testWithoutContext('macOS 11 x86', () async { testWithoutContext('macOS 11 x86', () async {
...@@ -335,7 +335,7 @@ void main() { ...@@ -335,7 +335,7 @@ void main() {
final OperatingSystemUtils utils = final OperatingSystemUtils utils =
createOSUtils(FakePlatform(operatingSystem: 'macos')); createOSUtils(FakePlatform(operatingSystem: 'macos'));
expect(utils.name, 'product version build darwin-arm'); expect(utils.name, 'product version build darwin-arm64');
}); });
testWithoutContext('macOS ARM on Rosetta name', () async { testWithoutContext('macOS ARM on Rosetta name', () async {
...@@ -385,7 +385,7 @@ void main() { ...@@ -385,7 +385,7 @@ void main() {
final OperatingSystemUtils utils = final OperatingSystemUtils utils =
createOSUtils(FakePlatform(operatingSystem: 'macos')); createOSUtils(FakePlatform(operatingSystem: 'macos'));
expect(utils.name, 'product version build darwin-arm (Rosetta)'); expect(utils.name, 'product version build darwin-arm64 (Rosetta)');
}); });
testWithoutContext('macOS x86 name', () async { testWithoutContext('macOS x86 name', () async {
......
...@@ -566,9 +566,9 @@ void main() { ...@@ -566,9 +566,9 @@ void main() {
cache.includeAllPlatforms = true; cache.includeAllPlatforms = true;
expect(artifacts.getBinaryDirs(), <List<String>>[ expect(artifacts.getBinaryDirs(), <List<String>>[
<String>['darwin-x64', 'darwin-x64/font-subset.zip'], // arm64 macOS hosts are not supported now <String>['darwin-x64', 'darwin-arm64/font-subset.zip'],
<String>['linux-arm64', 'linux-arm64/font-subset.zip'], <String>['linux-arm64', 'linux-arm64/font-subset.zip'],
<String>['windows-x64', 'windows-x64/font-subset.zip'], // arm64 macOS hosts are not supported now <String>['windows-x64', 'windows-x64/font-subset.zip'], // arm64 windows hosts are not supported now
]); ]);
}); });
......
...@@ -48,67 +48,9 @@ void main() { ...@@ -48,67 +48,9 @@ void main() {
dartEntrypointArgs: dartEntrypointArgs, dartEntrypointArgs: dartEntrypointArgs,
); );
testUsingContext('runs in Rosetta on arm64 Mac', () async {
final FakeProcessManager processManager = FakeProcessManager.empty();
final FlutterTesterTestDevice device = TestFlutterTesterDevice(
platform: FakePlatform(operatingSystem: 'macos'),
fileSystem: fileSystem,
processManager: processManager,
enableObservatory: false,
dartEntrypointArgs: const <String>[],
);
processManager.addCommands(<FakeCommand>[
const FakeCommand(
command: <String>[
'which',
'sysctl',
],
),
const FakeCommand(
command: <String>[
'sysctl',
'hw.optional.arm64',
],
stdout: 'hw.optional.arm64: 1',
),
FakeCommand(command: const <String>[
'/usr/bin/arch',
'-x86_64',
'/',
'--disable-observatory',
'--ipv6',
'--enable-checked-mode',
'--verify-entry-points',
'--enable-software-rendering',
'--skia-deterministic-rendering',
'--enable-dart-profiling',
'--non-interactive',
'--use-test-fonts',
'--disable-asset-fonts',
'--packages=.dart_tool/package_config.json',
'example.dill',
], environment: <String, String>{
'FLUTTER_TEST': 'true',
'FONTCONFIG_FILE': device.fontConfigManager.fontConfigFile.path,
'SERVER_PORT': '0',
'APP_NAME': '',
}),
]);
await device.start('example.dill');
expect(processManager, hasNoRemainingExpectations);
});
group('The FLUTTER_TEST environment variable is passed to the test process', () { group('The FLUTTER_TEST environment variable is passed to the test process', () {
setUp(() { setUp(() {
processManager = FakeProcessManager.list(<FakeCommand>[ processManager = FakeProcessManager.list(<FakeCommand>[]);
const FakeCommand(
command: <String>[
'uname',
'-m',
],
stdout: 'x86_64',
),
]);
device = createDevice(); device = createDevice();
fileSystem fileSystem
...@@ -175,13 +117,6 @@ void main() { ...@@ -175,13 +117,6 @@ void main() {
group('Dart Entrypoint Args', () { group('Dart Entrypoint Args', () {
setUp(() { setUp(() {
processManager = FakeProcessManager.list(<FakeCommand>[ processManager = FakeProcessManager.list(<FakeCommand>[
const FakeCommand(
command: <String>[
'uname',
'-m',
],
stdout: 'x86_64',
),
const FakeCommand( const FakeCommand(
command: <String>[ command: <String>[
'/', '/',
...@@ -217,13 +152,6 @@ void main() { ...@@ -217,13 +152,6 @@ void main() {
group('DDS', () { group('DDS', () {
setUp(() { setUp(() {
processManager = FakeProcessManager.list(<FakeCommand>[ processManager = FakeProcessManager.list(<FakeCommand>[
const FakeCommand(
command: <String>[
'uname',
'-m',
],
stdout: 'x86_64',
),
const FakeCommand( const FakeCommand(
command: <String>[ command: <String>[
'/', '/',
......
...@@ -197,7 +197,7 @@ void main() { ...@@ -197,7 +197,7 @@ void main() {
testWithoutContext('target platform display name on ARM', () async { testWithoutContext('target platform display name on ARM', () async {
final FakeOperatingSystemUtils fakeOperatingSystemUtils = final FakeOperatingSystemUtils fakeOperatingSystemUtils =
FakeOperatingSystemUtils(); FakeOperatingSystemUtils();
fakeOperatingSystemUtils.hostPlatform = HostPlatform.darwin_arm; fakeOperatingSystemUtils.hostPlatform = HostPlatform.darwin_arm64;
final MacOSDevice device = MacOSDevice( final MacOSDevice device = MacOSDevice(
fileSystem: MemoryFileSystem.test(), fileSystem: MemoryFileSystem.test(),
logger: BufferLogger.test(), logger: BufferLogger.test(),
......
...@@ -32,7 +32,7 @@ void main() { ...@@ -32,7 +32,7 @@ void main() {
logger: BufferLogger.test(), logger: BufferLogger.test(),
processManager: FakeProcessManager.any(), processManager: FakeProcessManager.any(),
fileSystem: MemoryFileSystem.test(), fileSystem: MemoryFileSystem.test(),
operatingSystemUtils: FakeOperatingSystemUtils(hostPlatform: HostPlatform.darwin_arm), operatingSystemUtils: FakeOperatingSystemUtils(hostPlatform: HostPlatform.darwin_arm64),
iosWorkflow: FakeIOSWorkflow(canListDevices: true), iosWorkflow: FakeIOSWorkflow(canListDevices: true),
); );
...@@ -45,7 +45,7 @@ void main() { ...@@ -45,7 +45,7 @@ void main() {
logger: BufferLogger.test(), logger: BufferLogger.test(),
processManager: FakeProcessManager.any(), processManager: FakeProcessManager.any(),
fileSystem: MemoryFileSystem.test(), fileSystem: MemoryFileSystem.test(),
operatingSystemUtils: FakeOperatingSystemUtils(hostPlatform: HostPlatform.darwin_arm), operatingSystemUtils: FakeOperatingSystemUtils(hostPlatform: HostPlatform.darwin_arm64),
iosWorkflow: FakeIOSWorkflow(canListDevices: true), iosWorkflow: FakeIOSWorkflow(canListDevices: true),
); );
expect(discoverer.supportsPlatform, isTrue); expect(discoverer.supportsPlatform, isTrue);
...@@ -77,7 +77,7 @@ void main() { ...@@ -77,7 +77,7 @@ void main() {
logger: BufferLogger.test(), logger: BufferLogger.test(),
processManager: FakeProcessManager.any(), processManager: FakeProcessManager.any(),
fileSystem: MemoryFileSystem.test(), fileSystem: MemoryFileSystem.test(),
operatingSystemUtils: FakeOperatingSystemUtils(hostPlatform: HostPlatform.darwin_arm), operatingSystemUtils: FakeOperatingSystemUtils(hostPlatform: HostPlatform.darwin_arm64),
iosWorkflow: FakeIOSWorkflow(canListDevices: false), iosWorkflow: FakeIOSWorkflow(canListDevices: false),
); );
expect(discoverer.supportsPlatform, isTrue); expect(discoverer.supportsPlatform, isTrue);
...@@ -93,7 +93,7 @@ void main() { ...@@ -93,7 +93,7 @@ void main() {
logger: BufferLogger.test(), logger: BufferLogger.test(),
processManager: FakeProcessManager.any(), processManager: FakeProcessManager.any(),
fileSystem: MemoryFileSystem.test(), fileSystem: MemoryFileSystem.test(),
operatingSystemUtils: FakeOperatingSystemUtils(hostPlatform: HostPlatform.darwin_arm), operatingSystemUtils: FakeOperatingSystemUtils(hostPlatform: HostPlatform.darwin_arm64),
iosWorkflow: FakeIOSWorkflow(canListDevices: true), iosWorkflow: FakeIOSWorkflow(canListDevices: true),
); );
expect(discoverer.supportsPlatform, isTrue); expect(discoverer.supportsPlatform, isTrue);
...@@ -116,7 +116,7 @@ void main() { ...@@ -116,7 +116,7 @@ void main() {
logger: BufferLogger.test(), logger: BufferLogger.test(),
processManager: FakeProcessManager.any(), processManager: FakeProcessManager.any(),
fileSystem: MemoryFileSystem.test(), fileSystem: MemoryFileSystem.test(),
operatingSystemUtils: FakeOperatingSystemUtils(hostPlatform: HostPlatform.darwin_arm), operatingSystemUtils: FakeOperatingSystemUtils(hostPlatform: HostPlatform.darwin_arm64),
); );
expect(device.id, 'designed-for-ipad'); expect(device.id, 'designed-for-ipad');
expect(await device.isLocalEmulator, isFalse); expect(await device.isLocalEmulator, isFalse);
......
...@@ -39,7 +39,7 @@ HostPlatform _identifyMacBinaryArch(String path) { ...@@ -39,7 +39,7 @@ HostPlatform _identifyMacBinaryArch(String path) {
case 'x86_64': case 'x86_64':
return HostPlatform.darwin_x64; return HostPlatform.darwin_x64;
case 'arm64': case 'arm64':
return HostPlatform.darwin_arm; return HostPlatform.darwin_arm64;
default: default:
fail('Unexpected architecture ${match.group(1)}'); fail('Unexpected architecture ${match.group(1)}');
} }
......
...@@ -228,7 +228,7 @@ void main() { ...@@ -228,7 +228,7 @@ void main() {
}); });
testWithoutContext('can launch x86_64 Chrome on ARM macOS', () async { testWithoutContext('can launch x86_64 Chrome on ARM macOS', () async {
final OperatingSystemUtils macOSUtils = FakeOperatingSystemUtils(hostPlatform: HostPlatform.darwin_arm); final OperatingSystemUtils macOSUtils = FakeOperatingSystemUtils(hostPlatform: HostPlatform.darwin_arm64);
final ChromiumLauncher chromiumLauncher = ChromiumLauncher( final ChromiumLauncher chromiumLauncher = ChromiumLauncher(
fileSystem: fileSystem, fileSystem: fileSystem,
platform: platform, platform: platform,
...@@ -267,7 +267,7 @@ void main() { ...@@ -267,7 +267,7 @@ void main() {
}); });
testWithoutContext('can launch ARM Chrome natively on ARM macOS when installed', () async { testWithoutContext('can launch ARM Chrome natively on ARM macOS when installed', () async {
final OperatingSystemUtils macOSUtils = FakeOperatingSystemUtils(hostPlatform: HostPlatform.darwin_arm); final OperatingSystemUtils macOSUtils = FakeOperatingSystemUtils(hostPlatform: HostPlatform.darwin_arm64);
final ChromiumLauncher chromiumLauncher = ChromiumLauncher( final ChromiumLauncher chromiumLauncher = ChromiumLauncher(
fileSystem: fileSystem, fileSystem: fileSystem,
platform: platform, platform: platform,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment