mirror of
https://github.com/flutter/flutter
synced 2024-07-05 01:48:58 +00:00
Add test for engine artifact framework permissions (#148786)
Framework test to validate the iOS and macOS framework engine artifacts (Flutter.framework and FlutterMacOS.framework) have read and executable permissions. ~~Will fail until https://github.com/flutter/engine/pull/52961 rolls.~~ <-- it rolled https://github.com/flutter/flutter/pull/148819
This commit is contained in:
parent
f2c48afbb1
commit
6c06abbb55
|
@ -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))
|
||||
|
|
|
@ -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(
|
||||
<String>[
|
||||
flutterBin,
|
||||
|
@ -54,6 +54,17 @@ void main() {
|
|||
|
||||
expect(result, const ProcessResultMatcher());
|
||||
expect(xcframeworkArtifact.existsSync(), isTrue);
|
||||
|
||||
final Directory frameworkArtifact = fileSystem.directory(
|
||||
fileSystem.path.joinAll(<String>[
|
||||
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 <String>['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');
|
||||
|
|
Loading…
Reference in New Issue
Block a user