Improve iOS unpack target's error messages (#154649)
Improves the formatting and error messages of the target that unpacks the Flutter framework in Flutter iOS builds. Follow up to: https://github.com/flutter/flutter/pull/154645 Part of https://github.com/flutter/flutter/issues/151567
This commit is contained in:
@@ -20,7 +20,10 @@ import '../../../src/context.dart';
|
||||
import '../../../src/fake_process_manager.dart';
|
||||
import '../../../src/fakes.dart';
|
||||
|
||||
final Platform macPlatform = FakePlatform(operatingSystem: 'macos', environment: <String, String>{});
|
||||
final Platform macPlatform = FakePlatform(
|
||||
operatingSystem: 'macos',
|
||||
environment: <String, String>{},
|
||||
);
|
||||
|
||||
const List<String> _kSharedConfig = <String>[
|
||||
'-dynamiclib',
|
||||
@@ -715,7 +718,7 @@ void main() {
|
||||
fileSystem: fileSystem,
|
||||
outputDir: outputDir,
|
||||
defines: <String, String>{
|
||||
kIosArchs: 'arm64 armv7',
|
||||
kIosArchs: 'arm64 x86_64',
|
||||
kSdkRoot: 'path/to/iPhoneOS.sdk',
|
||||
},
|
||||
);
|
||||
@@ -732,7 +735,7 @@ void main() {
|
||||
binary.path,
|
||||
'-verify_arch',
|
||||
'arm64',
|
||||
'armv7',
|
||||
'x86_64',
|
||||
], exitCode: 1),
|
||||
]);
|
||||
|
||||
@@ -741,7 +744,10 @@ void main() {
|
||||
throwsA(isException.having(
|
||||
(Exception exception) => exception.toString(),
|
||||
'description',
|
||||
contains('does not contain arm64 armv7. Running lipo -info:\nArchitectures in the fat file:'),
|
||||
contains(
|
||||
'does not contain architectures "arm64 x86_64".\n\n'
|
||||
'lipo -info:\nArchitectures in the fat file:',
|
||||
),
|
||||
)),
|
||||
);
|
||||
});
|
||||
@@ -757,7 +763,7 @@ void main() {
|
||||
fileSystem: fileSystem,
|
||||
outputDir: outputDir,
|
||||
defines: <String, String>{
|
||||
kIosArchs: 'arm64 armv7',
|
||||
kIosArchs: 'arm64 x86_64',
|
||||
kSdkRoot: 'path/to/iPhoneOS.sdk',
|
||||
},
|
||||
);
|
||||
@@ -774,7 +780,7 @@ void main() {
|
||||
binary.path,
|
||||
'-verify_arch',
|
||||
'arm64',
|
||||
'armv7',
|
||||
'x86_64',
|
||||
]),
|
||||
FakeCommand(command: <String>[
|
||||
'lipo',
|
||||
@@ -783,7 +789,7 @@ void main() {
|
||||
'-extract',
|
||||
'arm64',
|
||||
'-extract',
|
||||
'armv7',
|
||||
'x86_64',
|
||||
binary.path,
|
||||
], exitCode: 1,
|
||||
stderr: 'lipo error'),
|
||||
@@ -794,7 +800,12 @@ void main() {
|
||||
throwsA(isException.having(
|
||||
(Exception exception) => exception.toString(),
|
||||
'description',
|
||||
contains('Failed to extract arm64 armv7 for output/Flutter.framework/Flutter.\nlipo error\nRunning lipo -info:\nArchitectures in the fat file:'),
|
||||
contains(
|
||||
'Failed to extract architectures "arm64 x86_64" for output/Flutter.framework/Flutter.\n\n'
|
||||
'stderr:\n'
|
||||
'lipo error\n\n'
|
||||
'lipo -info:\nArchitectures in the fat file:',
|
||||
),
|
||||
)),
|
||||
);
|
||||
});
|
||||
@@ -840,7 +851,7 @@ void main() {
|
||||
fileSystem: fileSystem,
|
||||
outputDir: outputDir,
|
||||
defines: <String, String>{
|
||||
kIosArchs: 'arm64 armv7',
|
||||
kIosArchs: 'arm64 x86_64',
|
||||
kSdkRoot: 'path/to/iPhoneOS.sdk',
|
||||
},
|
||||
);
|
||||
@@ -857,7 +868,7 @@ void main() {
|
||||
binary.path,
|
||||
'-verify_arch',
|
||||
'arm64',
|
||||
'armv7',
|
||||
'x86_64',
|
||||
]),
|
||||
FakeCommand(command: <String>[
|
||||
'lipo',
|
||||
@@ -866,7 +877,7 @@ void main() {
|
||||
'-extract',
|
||||
'arm64',
|
||||
'-extract',
|
||||
'armv7',
|
||||
'x86_64',
|
||||
binary.path,
|
||||
]),
|
||||
xattrCommand,
|
||||
|
||||
Reference in New Issue
Block a user