From 952a14d5541c2d89913c31991e1462909ec7babf Mon Sep 17 00:00:00 2001 From: Adam Sitnik Date: Fri, 28 Jun 2024 13:03:04 +0200 Subject: [PATCH] re-enable BinaryFormatter tests, fixes #103447 (#104104) * re-enable BinaryFormatter tests, fixes #103447 * don't run BF tests on WASM and Mobile --- eng/Versions.props | 2 ++ .../Common/tests/TestUtilities/System/PlatformDetection.cs | 2 +- .../tests/System.Formats.Nrbf.Tests.csproj | 4 ++++ .../System.Resources.Extensions.BinaryFormat.Tests.csproj | 3 +-- .../System.Resources.Extensions.Compat.Tests.csproj | 1 + .../tests/System.Resources.Extensions.Tests.csproj | 1 + 6 files changed, 10 insertions(+), 3 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index 191f9587c29a8..7523819dc94a3 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -163,6 +163,8 @@ 2.0.0 17.10.0-beta1.24272.1 2.0.0-beta4.23407.1 + + 9.0.0-preview.7.24327.2 3.1.7 2.1.0 2.0.3 diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs index abed01449f263..d744960a63963 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs @@ -731,7 +731,7 @@ private static bool DetermineBinaryFormatterSupport() { return true; } - else if (IsNativeAot) + else if (IsNativeAot || IsBrowser || IsMobile) { return false; } diff --git a/src/libraries/System.Formats.Nrbf/tests/System.Formats.Nrbf.Tests.csproj b/src/libraries/System.Formats.Nrbf/tests/System.Formats.Nrbf.Tests.csproj index 2acfeb3e162ba..513d152362e24 100644 --- a/src/libraries/System.Formats.Nrbf/tests/System.Formats.Nrbf.Tests.csproj +++ b/src/libraries/System.Formats.Nrbf/tests/System.Formats.Nrbf.Tests.csproj @@ -17,5 +17,9 @@ + + + + diff --git a/src/libraries/System.Resources.Extensions/tests/BinaryFormatTests/System.Resources.Extensions.BinaryFormat.Tests.csproj b/src/libraries/System.Resources.Extensions/tests/BinaryFormatTests/System.Resources.Extensions.BinaryFormat.Tests.csproj index 31756f1f73e7a..4ed852682fb11 100644 --- a/src/libraries/System.Resources.Extensions/tests/BinaryFormatTests/System.Resources.Extensions.BinaryFormat.Tests.csproj +++ b/src/libraries/System.Resources.Extensions/tests/BinaryFormatTests/System.Resources.Extensions.BinaryFormat.Tests.csproj @@ -14,9 +14,7 @@ - @@ -40,6 +38,7 @@ + diff --git a/src/libraries/System.Resources.Extensions/tests/CompatTests/System.Resources.Extensions.Compat.Tests.csproj b/src/libraries/System.Resources.Extensions/tests/CompatTests/System.Resources.Extensions.Compat.Tests.csproj index 9fcff5ccde38c..e56833eb8b284 100644 --- a/src/libraries/System.Resources.Extensions/tests/CompatTests/System.Resources.Extensions.Compat.Tests.csproj +++ b/src/libraries/System.Resources.Extensions/tests/CompatTests/System.Resources.Extensions.Compat.Tests.csproj @@ -18,6 +18,7 @@ + diff --git a/src/libraries/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj b/src/libraries/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj index 8a197d0936867..d9fb191bb6930 100644 --- a/src/libraries/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj +++ b/src/libraries/System.Resources.Extensions/tests/System.Resources.Extensions.Tests.csproj @@ -21,6 +21,7 @@ +