-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable more BinaryFormatter tests (#107408)
* enable the BinaryFormatter tests in System.Runtime.Serialization.Formatters.Tests * add new test project, where the flag is disabled and it runs only 3 tests in total that ensure that * The SerializationGuard is no longer activated since BF was moved to the OOB package, the tests need to reflect that.
- Loading branch information
1 parent
1bad124
commit 8685859
Showing
5 changed files
with
72 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
23 changes: 23 additions & 0 deletions
23
...n.Formatters/tests/Disabled/System.Runtime.Serialization.Formatters.Disabled.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TestRuntime>true</TestRuntime> | ||
<IncludeRemoteExecutor>true</IncludeRemoteExecutor> | ||
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-freebsd;$(NetCoreAppCurrent)-illumos;$(NetCoreAppCurrent)-solaris;$(NetCoreAppCurrent)-haiku;$(NetCoreAppCurrent)-linux;$(NetCoreAppCurrent)-osx;$(NetCoreAppCurrent)-ios;$(NetCoreAppCurrent)-tvos</TargetFrameworks> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="DisableBitTests.cs" /> | ||
<Compile Include="..\TestConfiguration.cs" /> | ||
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.Serialization.Formatters\src\System.Runtime.Serialization.Formatters.csproj" /> | ||
</ItemGroup> | ||
<!-- | ||
We're testing the BinaryFormatter enablement / disablement switch, so we need to suppress any inherited behavior. | ||
See https://github.com/dotnet/runtime/issues/87811 for more details. | ||
This is a temporary solution and should be reverted back to the original once the necessary changes are made in | ||
shared frameworks and SDK. | ||
--> | ||
<Target Name="RemoveSerializationRuntimeOption" BeforeTargets="GenerateBuildRuntimeConfigurationFiles"> | ||
<ItemGroup> | ||
<RuntimeHostConfigurationOption Remove="System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization" /> | ||
</ItemGroup> | ||
</Target> | ||
</Project> |
105 changes: 10 additions & 95 deletions
105
src/libraries/System.Runtime.Serialization.Formatters/tests/SerializationGuardTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters