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 2e6af4156e..d1319d2860 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 @@ -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);