From 603104015dd692ea3403755b55d07813d5cf8965 Mon Sep 17 00:00:00 2001 From: flutteractionsbot <154381524+flutteractionsbot@users.noreply.github.com> Date: Thu, 24 Oct 2024 08:01:25 -0700 Subject: [PATCH] [CP-stable]Assert macOS framework artifact contains xcprivacy manifest (#155556) This is the framework-side test for https://github.com/flutter/engine/pull/55366. This test will fail unless it is run on a roll containing that fix. ### Issue Link: https://github.com/flutter/flutter/issues/154915 ### Changelog Description: Test that a built macOS app contains the FlutterMacOS framework privacy manifest and validates https://github.com/flutter/engine/pull/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 --- bin/internal/engine.version | 2 +- .../macos_content_validation_test.dart | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/bin/internal/engine.version b/bin/internal/engine.version index 4a8f46b74123e..f4d1e0cd5946a 100644 --- a/bin/internal/engine.version +++ b/bin/internal/engine.version @@ -1 +1 @@ -36335019a8eab588c3c2ea783c618d90505be233 +db49896cf25ceabc44096d5f088d86414e05a7aa 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 e2ae11e127f7d..575823e520d48 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 @@ -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);