diff --git a/packages/flutter_tools/test/host_cross_arch.shard/ios_content_validation_test.dart b/packages/flutter_tools/test/host_cross_arch.shard/ios_content_validation_test.dart index 0f7befcac57f..5d43340ef775 100644 --- a/packages/flutter_tools/test/host_cross_arch.shard/ios_content_validation_test.dart +++ b/packages/flutter_tools/test/host_cross_arch.shard/ios_content_validation_test.dart @@ -463,10 +463,9 @@ void main() { ); expect(appCodesign, const ProcessResultMatcher()); - // Check read/write permissions are being correctly set - final String rawStatString = flutterFrameworkDir.statSync().modeString(); - final String statString = rawStatString.substring(rawStatString.length - 9); - expect(statString, 'rwxr-xr-x'); + // Check read/write permissions are being correctly set. + final String statString = flutterFrameworkDir.statSync().mode.toRadixString(8); + expect(statString, '40755'); }); }, skip: !platform.isMacOS, // [intended] only makes sense for macos platform. timeout: const Timeout(Duration(minutes: 10)) diff --git a/packages/flutter_tools/test/host_cross_arch.shard/macos_content_validation_test.dart b/packages/flutter_tools/test/host_cross_arch.shard/macos_content_validation_test.dart index 2ff219c76419..e2ae11e127f7 100644 --- a/packages/flutter_tools/test/host_cross_arch.shard/macos_content_validation_test.dart +++ b/packages/flutter_tools/test/host_cross_arch.shard/macos_content_validation_test.dart @@ -41,7 +41,7 @@ void main() { final Directory tempDir = createResolvedTempDirectorySync('macos_content_validation.'); - // Pre-cache iOS engine Flutter.xcframework artifacts. + // Pre-cache macOS engine FlutterMacOS.xcframework artifacts. final ProcessResult result = processManager.runSync( [ flutterBin, @@ -54,6 +54,17 @@ void main() { expect(result, const ProcessResultMatcher()); expect(xcframeworkArtifact.existsSync(), isTrue); + + final Directory frameworkArtifact = fileSystem.directory( + fileSystem.path.joinAll([ + xcframeworkArtifact.path, + 'macos-arm64_x86_64', + 'FlutterMacOS.framework', + ]), + ); + // Check read/write permissions are set correctly in the framework engine artifact. + final String artifactStat = frameworkArtifact.statSync().mode.toRadixString(8); + expect(artifactStat, '40755'); }); for (final String buildMode in ['Debug', 'Release']) { @@ -164,10 +175,9 @@ void main() { ), ); - // Check read/write permissions are being correctly set - final String rawStatString = outputFlutterFramework.statSync().modeString(); - final String statString = rawStatString.substring(rawStatString.length - 9); - expect(statString, 'rwxr-xr-x'); + // Check read/write permissions are being correctly set. + final String outputFrameworkStat = outputFlutterFramework.statSync().mode.toRadixString(8); + expect(outputFrameworkStat, '40755'); // Check complicated macOS framework symlink structure. final Link current = outputFlutterFramework.childDirectory('Versions').childLink('Current');