Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate net6.0 and net5.0 builds of nunit.engine.core and use netcoreapp3.1 for all agents #1248

Merged
merged 2 commits into from
Oct 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 1 addition & 29 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -177,32 +177,6 @@ Task("TestNetCore31EngineCore")
RunDotnetNUnitLiteTests(ENGINE_CORE_TESTS_PROJECT, "netcoreapp3.1");
});

//////////////////////////////////////////////////////////////////////
// TEST NET 5.0 ENGINE CORE
//////////////////////////////////////////////////////////////////////

Task("TestNet50EngineCore")
.Description("Tests the .NET 5.0 Engine core assembly")
.IsDependentOn("Build")
.OnError(exception => { UnreportedErrors.Add(exception.Message); })
.Does(() =>
{
RunDotnetNUnitLiteTests(ENGINE_CORE_TESTS_PROJECT, "net5.0");
});

//////////////////////////////////////////////////////////////////////
// TEST NET 6.0 ENGINE CORE
//////////////////////////////////////////////////////////////////////

Task("TestNet60EngineCore")
.Description("Tests the .NET 6.0 Engine core assembly")
.IsDependentOn("Build")
.OnError(exception => { UnreportedErrors.Add(exception.Message); })
.Does(() =>
{
RunDotnetNUnitLiteTests(ENGINE_CORE_TESTS_PROJECT, NETCORE_ENGINE_TARGET);
});

//////////////////////////////////////////////////////////////////////
// TEST .NET 4.6.2 ENGINE
//////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -655,9 +629,7 @@ Task("TestEngineCore")
.Description("Builds and tests the engine core assembly")
.IsDependentOn("TestNet20EngineCore")
.IsDependentOn("TestNetStandard20EngineCore")
.IsDependentOn("TestNetCore31EngineCore")
.IsDependentOn("TestNet50EngineCore")
.IsDependentOn("TestNet60EngineCore");
.IsDependentOn("TestNetCore31EngineCore");

Task("TestEngine")
.Description("Builds and tests the engine assembly")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ public void ServiceIsStarted()
}


#if NET5_0_OR_GREATER
[TestCase("mock-assembly.dll", false, typeof(NUnitNetCore31Driver))]
[TestCase("mock-assembly.dll", true, typeof(NUnitNetCore31Driver))]
//[TestCase("notest-assembly.dll", false, typeof(NUnitNetCore31Driver))]
#elif NETCOREAPP3_1
#if NETCOREAPP3_1
[TestCase("mock-assembly.dll", false, typeof(NUnitNetCore31Driver))]
[TestCase("mock-assembly.dll", true, typeof(NUnitNetCore31Driver))]
//[TestCase("notest-assembly.dll", false, typeof(NUnitNetCore31Driver))]
Expand All @@ -55,9 +51,9 @@ public void ServiceIsStarted()
[TestCase("junk.dll", true, typeof(InvalidAssemblyFrameworkDriver))]
[TestCase("nunit.engine.core.dll", false, typeof(InvalidAssemblyFrameworkDriver))]
[TestCase("nunit.engine.core.dll", true, typeof(SkippedAssemblyFrameworkDriver))]
#if !NET5_0_OR_GREATER // Not yet working
// Not yet working
//[TestCase("notest-assembly.dll", true, typeof(SkippedAssemblyFrameworkDriver))]
#endif

public void CorrectDriverIsUsed(string fileName, bool skipNonTestAssemblies, Type expectedType)
{
var driver = _driverService.GetDriver(AppDomain.CurrentDomain, Path.Combine(TestContext.CurrentContext.TestDirectory, fileName), null, skipNonTestAssemblies);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<RootNamespace>NUnit.Engine.Core.Tests</RootNamespace>
<TargetFrameworks>net35;netcoreapp2.1;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>net35;netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
<OutputType>Exe</OutputType>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\nunit.snk</AssemblyOriginatorKeyFile>
Expand Down
6 changes: 3 additions & 3 deletions src/NUnitEngine/nunit.engine.core/nunit.engine.core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<RootNamespace>NUnit.Engine</RootNamespace>
<TargetFrameworks>net20;netstandard2.0;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>net20;netstandard2.0;netcoreapp3.1</TargetFrameworks>
<NoWarn>$(NoWarn);SYSLIB0011;SYSLIB0012</NoWarn><!-- TODO: Get rid of obsolete stuff -->
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\nunit.snk</AssemblyOriginatorKeyFile>
Expand All @@ -12,8 +12,8 @@
</PropertyGroup>

<PropertyGroup>
<Product>NUnit Engine ($(TargetFramework))</Product>
<AssemblyTitle>NUnit Engine Core</AssemblyTitle>
<Product>NUnit Engine</Product>
<AssemblyTitle>NUnit Engine Core ($(TargetFramework))</AssemblyTitle>
<Description>Common code used by both the engine and agents</Description>
</PropertyGroup>

Expand Down