Skip to content

Commit

Permalink
[CP-stable]Assert macOS framework artifact contains xcprivacy manifest (
Browse files Browse the repository at this point in the history
flutter#155556)

This is the framework-side test for flutter/engine#55366.  This test will fail unless it is run on a roll containing that fix.

### Issue Link:
flutter#154915

### Changelog Description:
Test that a built macOS app contains the FlutterMacOS framework privacy manifest and validates flutter/engine#55366.

### Impact Description:
Adds confidence the Flutter macOS engine framework contains the expected privacy manifest at the right path.

### Workaround:
N/A

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
Run the flutter_tool tests
  • Loading branch information
flutteractionsbot authored Oct 24, 2024
1 parent 268cd08 commit 6031040
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bin/internal/engine.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
36335019a8eab588c3c2ea783c618d90505be233
db49896cf25ceabc44096d5f088d86414e05a7aa
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,19 @@ void main() {
expect(outputFlutterFramework.childLink('Modules'), isNot(exists));
expect(outputFlutterFramework.childDirectory('Modules'), isNot(exists));

// PrivacyInfo.xcprivacy was first added to the top-level path, but
// the correct location is Versions/A/Resources/PrivacyInfo.xcprivacy.
// TODO(jmagman): Switch expectation to only check Resources/ once the new path rolls.
// https://github.com/flutter/flutter/issues/157016#issuecomment-2420786225
final File topLevelPrivacy = outputFlutterFramework.childFile('PrivacyInfo.xcprivacy');
final File resourcesLevelPrivacy = fileSystem.file(fileSystem.path.join(
outputFlutterFramework.path,
'Resources',
'PrivacyInfo.xcprivacy',
));

expect(topLevelPrivacy.existsSync() || resourcesLevelPrivacy.existsSync(), isTrue);

// Build again without cleaning.
final ProcessResult secondBuild = processManager.runSync(buildCommand, workingDirectory: workingDirectory);

Expand Down

0 comments on commit 6031040

Please sign in to comment.