From fb66195b2c20c461c7d14c72ec7f2bcf941e87a6 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 8 Aug 2023 17:12:08 +0200 Subject: [PATCH 1/2] [tests] Filter out any warnings about out-of-support workloads. Our test projects may be using an earlier version of .NET (in particular Touch.Unit and MonoTouch.Dialog often are), so ignore any warnings about out-of-support workloads. Fixes test failures like: Xamarin.Tests.BundleStructureTest.Build(MacCatalyst,"maccatalyst-x64;maccatalyst-arm64",All,"Debug"): Warnings Expected is with 22 elements, actual is Values differ at index [22] Extra: < "The workload 'maccatalyst' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/maui-support-policy for more information about the support policy.", "The workload 'maccatalyst' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/maui-support-policy for more information about the support policy.", "The workload 'maccatalyst' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/maui-support-policy for more information about the support policy."... > --- tests/common/BinLog.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/common/BinLog.cs b/tests/common/BinLog.cs index 36fdc413452d..b68e31d74009 100644 --- a/tests/common/BinLog.cs +++ b/tests/common/BinLog.cs @@ -175,7 +175,12 @@ public static IEnumerable PrintToLines (string path) public static IEnumerable GetBuildLogWarnings (string path) { - return GetBuildMessages (path).Where (v => v.Type == BuildLogEventType.Warning); + return GetBuildMessages (path) + // Filter to warnings + .Where (v => v.Type == BuildLogEventType.Warning) + // We're often referencing earlier .NET projects (Touch.Unit/MonoTouch.Dialog), so ignore any out-of-support warnings. + .Where (v => v.Message?.Contains ("is out of support and will not receive security updates in the future") != false) + ; } public static IEnumerable GetBuildLogErrors (string path) From 25eab7446dac3aa965e14b114551afecf6cd747a Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 9 Aug 2023 10:49:34 +0200 Subject: [PATCH 2/2] Fix boolean logic --- tests/common/BinLog.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/common/BinLog.cs b/tests/common/BinLog.cs index b68e31d74009..a832cbb2af6e 100644 --- a/tests/common/BinLog.cs +++ b/tests/common/BinLog.cs @@ -179,7 +179,7 @@ public static IEnumerable GetBuildLogWarnings (string path) // Filter to warnings .Where (v => v.Type == BuildLogEventType.Warning) // We're often referencing earlier .NET projects (Touch.Unit/MonoTouch.Dialog), so ignore any out-of-support warnings. - .Where (v => v.Message?.Contains ("is out of support and will not receive security updates in the future") != false) + .Where (v => v.Message?.Contains ("is out of support and will not receive security updates in the future") != true) ; }