mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +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());
|
expect(appCodesign, const ProcessResultMatcher());
|
||||||
|
|
||||||
// Check read/write permissions are being correctly set
|
// Check read/write permissions are being correctly set.
|
||||||
final String rawStatString = flutterFrameworkDir.statSync().modeString();
|
final String statString = flutterFrameworkDir.statSync().mode.toRadixString(8);
|
||||||
final String statString = rawStatString.substring(rawStatString.length - 9);
|
expect(statString, '40755');
|
||||||
expect(statString, 'rwxr-xr-x');
|
|
||||||
});
|
});
|
||||||
}, skip: !platform.isMacOS, // [intended] only makes sense for macos platform.
|
}, skip: !platform.isMacOS, // [intended] only makes sense for macos platform.
|
||||||
timeout: const Timeout(Duration(minutes: 10))
|
timeout: const Timeout(Duration(minutes: 10))
|
||||||
|
@ -41,7 +41,7 @@ void main() {
|
|||||||
|
|
||||||
final Directory tempDir = createResolvedTempDirectorySync('macos_content_validation.');
|
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(
|
final ProcessResult result = processManager.runSync(
|
||||||
<String>[
|
<String>[
|
||||||
flutterBin,
|
flutterBin,
|
||||||
@ -54,6 +54,17 @@ void main() {
|
|||||||
|
|
||||||
expect(result, const ProcessResultMatcher());
|
expect(result, const ProcessResultMatcher());
|
||||||
expect(xcframeworkArtifact.existsSync(), isTrue);
|
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']) {
|
for (final String buildMode in <String>['Debug', 'Release']) {
|
||||||
@ -164,10 +175,9 @@ void main() {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Check read/write permissions are being correctly set
|
// Check read/write permissions are being correctly set.
|
||||||
final String rawStatString = outputFlutterFramework.statSync().modeString();
|
final String outputFrameworkStat = outputFlutterFramework.statSync().mode.toRadixString(8);
|
||||||
final String statString = rawStatString.substring(rawStatString.length - 9);
|
expect(outputFrameworkStat, '40755');
|
||||||
expect(statString, 'rwxr-xr-x');
|
|
||||||
|
|
||||||
// Check complicated macOS framework symlink structure.
|
// Check complicated macOS framework symlink structure.
|
||||||
final Link current = outputFlutterFramework.childDirectory('Versions').childLink('Current');
|
final Link current = outputFlutterFramework.childDirectory('Versions').childLink('Current');
|
||||||
|
Loading…
Reference in New Issue
Block a user