Fix C# tests running with dotnet

This commit is contained in:
Wojtek Figat
2023-01-08 19:17:41 +01:00
parent c53af39c92
commit bf60955e5e
21 changed files with 375 additions and 1264 deletions

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<DotNetCliTool Version="1">
<Commands>
<Command Name="dotnet-nunit" EntryPoint="nunit3-netcore-console.dll" Runner="dotnet" />
</Commands>
</DotNetCliTool>

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

View File

@@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)NUnit3.TestAdapter.dll">
<Link>NUnit3.TestAdapter.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</None>
<None Include="$(MSBuildThisFileDirectory)NUnit3.TestAdapter.pdb" Condition="Exists('$(MSBuildThisFileDirectory)NUnit3.TestAdapter.pdb')">
<Link>NUnit3.TestAdapter.pdb</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</None>
<None Include="$(MSBuildThisFileDirectory)nunit.engine.dll">
<Link>nunit.engine.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</None>
<None Include="$(MSBuildThisFileDirectory)nunit.engine.api.dll">
<Link>nunit.engine.api.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</None>
<None Include="$(MSBuildThisFileDirectory)nunit.engine.core.dll">
<Link>nunit.engine.core.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</None>
<None Include="$(MSBuildThisFileDirectory)testcentric.engine.metadata.dll">
<Link>testcentric.engine.metadata.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</None>
</ItemGroup>
</Project>

Binary file not shown.

BIN
Source/Platforms/DotNet/NUnit/nunit.engine.api.pdb (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -173,12 +173,11 @@
</summary>
<param name="reference">An AssemblyName referring to the possible test framework.</param>
</member>
<member name="M:NUnit.Engine.Extensibility.IDriverFactory.GetDriver(System.AppDomain,System.Reflection.AssemblyName)">
<member name="M:NUnit.Engine.Extensibility.IDriverFactory.GetDriver(System.Reflection.AssemblyName)">
<summary>
Gets a driver for a given test assembly and a framework
which the assembly is already known to reference.
</summary>
<param name="domain">The domain in which the assembly will be loaded</param>
<param name="reference">An AssemblyName referring to the test framework.</param>
<returns></returns>
</member>
@@ -1016,21 +1015,10 @@
TestEngineActivator creates an instance of the test engine and returns an ITestEngine interface.
</summary>
</member>
<member name="M:NUnit.Engine.TestEngineActivator.CreateInstance(System.Boolean)">
<member name="M:NUnit.Engine.TestEngineActivator.CreateInstance">
<summary>
Create an instance of the test engine.
</summary>
<param name="unused">This parameter is no longer used but has not been removed to ensure API compatibility.</param>
<exception cref="T:NUnit.Engine.NUnitEngineNotFoundException">Thrown when a test engine of the required minimum version is not found</exception>
<returns>An <see cref="T:NUnit.Engine.ITestEngine"/></returns>
</member>
<member name="M:NUnit.Engine.TestEngineActivator.CreateInstance(System.Version,System.Boolean)">
<summary>
Create an instance of the test engine with a minimum version.
</summary>
<param name="minVersion">The minimum version of the engine to return inclusive.</param>
<param name="unused">This parameter is no longer used but has not been removed to ensure API compatibility.</param>
<exception cref="T:NUnit.Engine.NUnitEngineNotFoundException">Thrown when a test engine of the required minimum version is not found</exception>
<returns>An <see cref="T:NUnit.Engine.ITestEngine"/></returns>
</member>
<member name="T:NUnit.Engine.TestFilter">

Binary file not shown.

BIN
Source/Platforms/DotNet/NUnit/nunit.engine.core.pdb (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
Source/Platforms/DotNet/NUnit/nunit.engine.pdb (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,319 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v6.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
"nunit3-netcore-console/3.16.1": {
"dependencies": {
"nunit.engine": "3.16.1",
"nunit.engine.api": "3.16.1"
},
"runtime": {
"nunit3-netcore-console.dll": {}
}
},
"Microsoft.Extensions.DependencyModel/3.1.0": {
"dependencies": {
"System.Text.Json": "4.7.0"
},
"runtime": {
"lib/netstandard2.0/Microsoft.Extensions.DependencyModel.dll": {
"assemblyVersion": "3.1.0.0",
"fileVersion": "3.100.19.56502"
}
}
},
"Microsoft.NETCore.Platforms/1.1.0": {},
"Microsoft.NETCore.Targets/1.1.0": {},
"Microsoft.Win32.Registry/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"System.Collections": "4.3.0",
"System.Globalization": "4.3.0",
"System.Resources.ResourceManager": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Extensions": "4.3.0",
"System.Runtime.Handles": "4.3.0",
"System.Runtime.InteropServices": "4.3.0"
}
},
"System.Collections/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Globalization/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.IO/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0",
"System.Text.Encoding": "4.3.0",
"System.Threading.Tasks": "4.3.0"
}
},
"System.Reflection/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.IO": "4.3.0",
"System.Reflection.Primitives": "4.3.0",
"System.Runtime": "4.3.0"
}
},
"System.Reflection.Primitives/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Resources.ResourceManager/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Globalization": "4.3.0",
"System.Reflection": "4.3.0",
"System.Runtime": "4.3.0"
}
},
"System.Runtime/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0"
}
},
"System.Runtime.Extensions/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Runtime.Handles/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Runtime.InteropServices/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Reflection": "4.3.0",
"System.Reflection.Primitives": "4.3.0",
"System.Runtime": "4.3.0",
"System.Runtime.Handles": "4.3.0"
}
},
"System.Text.Encoding/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Text.Json/4.7.0": {},
"System.Threading.Tasks/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"TestCentric.Metadata/1.7.1": {
"runtime": {
"lib/netstandard2.0/testcentric.engine.metadata.dll": {
"assemblyVersion": "1.7.1.0",
"fileVersion": "1.7.1.0"
}
}
},
"nunit.engine/3.16.1": {
"dependencies": {
"nunit.engine.api": "3.16.1",
"nunit.engine.core": "3.16.1"
},
"runtime": {
"nunit.engine.dll": {}
}
},
"nunit.engine.api/3.16.1": {
"runtime": {
"nunit.engine.api.dll": {}
}
},
"nunit.engine.core/3.16.1": {
"dependencies": {
"Microsoft.Extensions.DependencyModel": "3.1.0",
"Microsoft.Win32.Registry": "4.3.0",
"TestCentric.Metadata": "1.7.1",
"nunit.engine.api": "3.16.1"
},
"runtime": {
"nunit.engine.core.dll": {}
}
}
}
},
"libraries": {
"nunit3-netcore-console/3.16.1": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Microsoft.Extensions.DependencyModel/3.1.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-8tBjqI1xU3CNjdXMZF7BaY71ChU44x30QtHI2rVmPB3+3PjYi+YGhVTV5+IOlc40F81Bylh4gWwHET3jVKFE4Q==",
"path": "microsoft.extensions.dependencymodel/3.1.0",
"hashPath": "microsoft.extensions.dependencymodel.3.1.0.nupkg.sha512"
},
"Microsoft.NETCore.Platforms/1.1.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==",
"path": "microsoft.netcore.platforms/1.1.0",
"hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
},
"Microsoft.NETCore.Targets/1.1.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==",
"path": "microsoft.netcore.targets/1.1.0",
"hashPath": "microsoft.netcore.targets.1.1.0.nupkg.sha512"
},
"Microsoft.Win32.Registry/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Lw1/VwLH1yxz6SfFEjVRCN0pnflLEsWgnV4qsdJ512/HhTwnKXUG+zDQ4yTO3K/EJQemGoNaBHX5InISNKTzUQ==",
"path": "microsoft.win32.registry/4.3.0",
"hashPath": "microsoft.win32.registry.4.3.0.nupkg.sha512"
},
"System.Collections/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==",
"path": "system.collections/4.3.0",
"hashPath": "system.collections.4.3.0.nupkg.sha512"
},
"System.Globalization/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==",
"path": "system.globalization/4.3.0",
"hashPath": "system.globalization.4.3.0.nupkg.sha512"
},
"System.IO/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==",
"path": "system.io/4.3.0",
"hashPath": "system.io.4.3.0.nupkg.sha512"
},
"System.Reflection/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==",
"path": "system.reflection/4.3.0",
"hashPath": "system.reflection.4.3.0.nupkg.sha512"
},
"System.Reflection.Primitives/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==",
"path": "system.reflection.primitives/4.3.0",
"hashPath": "system.reflection.primitives.4.3.0.nupkg.sha512"
},
"System.Resources.ResourceManager/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==",
"path": "system.resources.resourcemanager/4.3.0",
"hashPath": "system.resources.resourcemanager.4.3.0.nupkg.sha512"
},
"System.Runtime/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==",
"path": "system.runtime/4.3.0",
"hashPath": "system.runtime.4.3.0.nupkg.sha512"
},
"System.Runtime.Extensions/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==",
"path": "system.runtime.extensions/4.3.0",
"hashPath": "system.runtime.extensions.4.3.0.nupkg.sha512"
},
"System.Runtime.Handles/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==",
"path": "system.runtime.handles/4.3.0",
"hashPath": "system.runtime.handles.4.3.0.nupkg.sha512"
},
"System.Runtime.InteropServices/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==",
"path": "system.runtime.interopservices/4.3.0",
"hashPath": "system.runtime.interopservices.4.3.0.nupkg.sha512"
},
"System.Text.Encoding/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==",
"path": "system.text.encoding/4.3.0",
"hashPath": "system.text.encoding.4.3.0.nupkg.sha512"
},
"System.Text.Json/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-IPq/x/d5nAcnD3vIyM3AbPOaTgcqrh0AqPSx7U53UFu3M6k1TH1u/eXc9/h4jm/3mpP1WRUpevlPY4PACd7AWw==",
"path": "system.text.json/4.7.0",
"hashPath": "system.text.json.4.7.0.nupkg.sha512"
},
"System.Threading.Tasks/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==",
"path": "system.threading.tasks/4.3.0",
"hashPath": "system.threading.tasks.4.3.0.nupkg.sha512"
},
"TestCentric.Metadata/1.7.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-QjdwsUJXJbGmFKNiTZbWeRpwhqRcEAtgb+dwR4YVK8xUBBEfXfrFV074f1DBtnrOfAIT+LnZCeVVeg/fYUlAEA==",
"path": "testcentric.metadata/1.7.1",
"hashPath": "testcentric.metadata.1.7.1.nupkg.sha512"
},
"nunit.engine/3.16.1": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"nunit.engine.api/3.16.1": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"nunit.engine.core/3.16.1": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

BIN
Source/Platforms/DotNet/NUnit/nunit3-netcore-console.dll (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -10,9 +10,12 @@
<supportedRuntime version="v4.0.30319" />
<supportedRuntime version="v2.0.50727" />
</startup>
<runtime>
<!-- Ensure that test exceptions don't crash NUnit -->
<legacyUnhandledExceptionPolicy enabled="1" />
<!--
Since legacyUnhandledExceptionPolicy keeps the console from being killed even though an NUnit framework
test worker thread is killed, this is needed to prevent a hang. NUnit framework can only handle these
@@ -20,10 +23,13 @@
for partial trust which would enable it to use [HandleProcessCorruptedStateExceptions].)
-->
<legacyCorruptedStateExceptionsPolicy enabled="true" />
<!-- Run partial trust V2 assemblies in full trust under .NET 4.0 -->
<loadFromRemoteSources enabled="true" />
<!-- Enable reading source information from Portable and Embedded PDBs when running applications -->
<!-- built against previous .NET Framework versions on .NET Framework 4.7.2 -->
<AppContextSwitchOverrides value="Switch.System.Diagnostics.IgnorePortablePDBsInStackTraces=false" />
</runtime>
</configuration>
</configuration>

BIN
Source/Platforms/DotNet/NUnit/nunit3-netcore-console.pdb (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -0,0 +1,13 @@
{
"runtimeOptions": {
"tfm": "net6.0",
"rollForward": "Major",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "6.0.0"
},
"configProperties": {
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false
}
}
}

Binary file not shown.