Test alternate correct macOS framework xcprivacy manifest location (#157318)

Cherry-pick the beta branch test https://github.com/flutter/flutter/pull/157136 back to master  so this doesn't regress in the next beta.

This is the framework test for https://github.com/flutter/flutter/issues/157016 on master.  Engine fix can be merged once this merges.
This commit is contained in:
Jenn Magder 2024-10-22 12:41:14 -07:00 committed by GitHub
parent 1d5087eb30
commit e38eb756bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -225,7 +225,19 @@ void main() {
expect(outputFlutterFramework.childDirectory('Headers'), isNot(exists));
expect(outputFlutterFramework.childLink('Modules'), isNot(exists));
expect(outputFlutterFramework.childDirectory('Modules'), isNot(exists));
expect(outputFlutterFramework.childFile('PrivacyInfo.xcprivacy'), 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);