From b84e2b074a290d63f9fd3e9fc22999e915e9c11a Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 5 Jun 2026 09:36:08 +0200 Subject: [PATCH 1/2] [tests] Add a few missing warning filters. --- tests/dotnet/UnitTests/TemplateTest.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/dotnet/UnitTests/TemplateTest.cs b/tests/dotnet/UnitTests/TemplateTest.cs index 00f8e790b0f..b39ad52008e 100644 --- a/tests/dotnet/UnitTests/TemplateTest.cs +++ b/tests/dotnet/UnitTests/TemplateTest.cs @@ -236,7 +236,7 @@ public void CreateAndBuildProjectTemplate (TemplateInfo info) rv = DotNet.AssertBuild (proj, properties); // There should still not be any warnings - warnings = BinLog.GetBuildLogWarnings (rv.BinLogPath).Select (v => v.Message); + warnings = BinLog.GetBuildLogWarnings (rv.BinLogPath).FilterWarnings (info.Platform).Select (v => v.Message); Assert.That (warnings, Is.Empty, $"Build warnings (2):\n\t{string.Join ("\n\t", warnings)}"); var appPath = GetAppPath (proj, platform, runtimeIdentifiers); @@ -280,7 +280,7 @@ bool IsMatching (TemplateLanguage lang, TemplateLanguage? value) var proj = Path.Combine (outputDir, $"{info.Template}.{language.AsFileExtension ()}"); var properties = GetDefaultProperties (); var rv = DotNet.AssertBuild (proj, properties); - var warnings = BinLog.GetBuildLogWarnings (rv.BinLogPath).Select (v => v.Message); + var warnings = BinLog.GetBuildLogWarnings (rv.BinLogPath).FilterWarnings (platform).Select (v => v.Message); Assert.That (warnings, Is.Empty, $"Build warnings:\n\t{string.Join ("\n\t", warnings)}"); if (info.Execute) { @@ -295,7 +295,7 @@ bool IsMatching (TemplateLanguage lang, TemplateLanguage? value) rv = DotNet.AssertBuild (proj, properties); // There should still not be any warnings - warnings = BinLog.GetBuildLogWarnings (rv.BinLogPath).Select (v => v.Message); + warnings = BinLog.GetBuildLogWarnings (rv.BinLogPath).FilterWarnings (platform).Select (v => v.Message); Assert.That (warnings, Is.Empty, $"Build warnings (2):\n\t{string.Join ("\n\t", warnings)}"); var appPath = GetAppPath (proj, platform, runtimeIdentifiers); From baa8185c76eb1492e7fc9ca2cf4d4f9a48a469c9 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 5 Jun 2026 16:18:26 +0200 Subject: [PATCH 2/2] [tests] Add a few missing warning filters. --- tests/dotnet/UnitTests/ProjectTest.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/dotnet/UnitTests/ProjectTest.cs b/tests/dotnet/UnitTests/ProjectTest.cs index 8cbe51e3d86..64d3af42e5d 100644 --- a/tests/dotnet/UnitTests/ProjectTest.cs +++ b/tests/dotnet/UnitTests/ProjectTest.cs @@ -2400,7 +2400,7 @@ public void NoWarnCodesign (ApplePlatform platform, string runtimeIdentifiers, s properties ["ExcludeNUnitLiteReference"] = "true"; properties ["ExcludeTouchUnitReference"] = "true"; var rv = DotNet.AssertBuild (project_path, properties); - rv.AssertNoWarnings (); + rv.AssertNoWarnings ((evt) => !Extensions.IsFilteredWarning (evt, platform)); } [Test] @@ -2652,7 +2652,7 @@ public void MultiTargetLibrary (ApplePlatform platform) properties ["cmdline:AllTheTargetFrameworks"] = targetFrameworks; var rv = DotNet.AssertBuild (project_path, properties); - rv.AssertNoWarnings (); + rv.AssertNoWarnings ((evt) => !Extensions.IsFilteredWarning (evt, platform)); } // Mac Catalyst projects can't be built with an earlier version of Xcode (even library projects),