Skip to content

Commit

Permalink
Remove .NET 2.0 and 3.5 builds
Browse files Browse the repository at this point in the history
  • Loading branch information
CharliePoole committed Jul 1, 2024
1 parent 84e45ad commit 54b4b5b
Show file tree
Hide file tree
Showing 52 changed files with 262 additions and 369 deletions.
36 changes: 20 additions & 16 deletions NUnitConsole.sln
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
nunit.ico = nunit.ico
package-checks.cake = package-checks.cake
package-tests.cake = package-tests.cake
packages.cake = packages.cake
README.md = README.md
test-results.cake = test-results.cake
VERSIONING.md = VERSIONING.md
cake\zip-package.cake = cake\zip-package.cake
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "nuget", "nuget", "{A972031D-2F61-4183-AF75-99EE1A9F6B32}"
Expand Down Expand Up @@ -85,9 +87,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "choco", "choco", "{4FDF7BFA
choco\nunit-agent-x86.exe.ignore = choco\nunit-agent-x86.exe.ignore
choco\nunit-agent.exe.ignore = choco\nunit-agent.exe.ignore
choco\nunit-console-runner.nuspec = choco\nunit-console-runner.nuspec
choco\VERIFICATION.txt = choco\VERIFICATION.txt
choco\nunit.console.choco.addins = choco\nunit.console.choco.addins
choco\nunit.console.choco.agent.addins = choco\nunit.console.choco.agent.addins
choco\VERIFICATION.txt = choco\VERIFICATION.txt
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "deprecated", "deprecated", "{9A7C8370-ED1F-486F-A8F5-C5BF4221464E}"
Expand All @@ -107,20 +109,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "deprecated", "deprecated",
choco\deprecated\nunit-console-with-extensions.nuspec = choco\deprecated\nunit-console-with-extensions.nuspec
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cake", "cake", "{9BCA00E2-D072-424B-A6DF-5BECF719C1FB}"
ProjectSection(SolutionItems) = preProject
cake\constants.cake = cake\constants.cake
cake\dotnet.cake = cake\dotnet.cake
cake\header-check.cake = cake\header-check.cake
cake\package-checks.cake = cake\package-checks.cake
cake\package-definitions.cake = cake\package-definitions.cake
cake\package-tester.cake = cake\package-tester.cake
cake\package-tests.cake = cake\package-tests.cake
cake\test-results.cake = cake\test-results.cake
cake\utilities.cake = cake\utilities.cake
cake\versioning.cake = cake\versioning.cake
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "msi", "msi", "{0C0D20CE-70CD-4CEF-BE9B-AEB8A2DE9C8A}"
ProjectSection(SolutionItems) = preProject
msi\nunit-install.sln = msi\nunit-install.sln
Expand Down Expand Up @@ -168,6 +156,22 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "nunit", "nunit", "{93E5CAF4
msi\nunit\variables.wxi = msi\nunit\variables.wxi
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cake", "cake", "{D6449B7A-20FF-467B-A65E-174DD6992AEB}"
ProjectSection(SolutionItems) = preProject
cake\build-settings.cake = cake\build-settings.cake
cake\constants.cake = cake\constants.cake
cake\dotnet.cake = cake\dotnet.cake
cake\extending.cake = cake\extending.cake
cake\header-check.cake = cake\header-check.cake
cake\package-checks.cake = cake\package-checks.cake
cake\package-definitions.cake = cake\package-definitions.cake
cake\package-tester.cake = cake\package-tester.cake
cake\package-tests.cake = cake\package-tests.cake
cake\test-results.cake = cake\test-results.cake
cake\utilities.cake = cake\utilities.cake
cake\versioning.cake = cake\versioning.cake
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -244,7 +248,6 @@ Global
{333D2FBC-CCA7-46AF-9453-C310671A67B0} = {31B45C4C-206F-4F31-9CC6-33BF11DFEE39}
{9D3015EE-5B84-41B3-A1D3-1A439370C392} = {31B45C4C-206F-4F31-9CC6-33BF11DFEE39}
{068F6CA9-6108-4F45-8540-351AA5227259} = {4FDF7BFA-A337-41D3-898D-C6A98278E6AD}
{9BCA00E2-D072-424B-A6DF-5BECF719C1FB} = {49D441DF-39FD-4F4D-AECA-86CF8EFE23AF}
{0C0D20CE-70CD-4CEF-BE9B-AEB8A2DE9C8A} = {49D441DF-39FD-4F4D-AECA-86CF8EFE23AF}
{20005864-BE82-412D-99BF-288E2D8370E9} = {49D441DF-39FD-4F4D-AECA-86CF8EFE23AF}
{CACC0520-B452-4310-A33C-DC944129ACDD} = {31B45C4C-206F-4F31-9CC6-33BF11DFEE39}
Expand All @@ -253,6 +256,7 @@ Global
{50371E48-BEC3-4D53-BD37-F3A6149CFD0D} = {25DA12FE-6209-4524-9A37-8E51F815E198}
{C5B7120C-190B-4C38-95CB-83F12799598D} = {49D441DF-39FD-4F4D-AECA-86CF8EFE23AF}
{93E5CAF4-D5DB-4915-AF0F-908A6043E462} = {0C0D20CE-70CD-4CEF-BE9B-AEB8A2DE9C8A}
{D6449B7A-20FF-467B-A65E-174DD6992AEB} = {49D441DF-39FD-4F4D-AECA-86CF8EFE23AF}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D8E4FC26-5422-4C51-8BBC-D1AC0A578711}
Expand Down
8 changes: 4 additions & 4 deletions NetFXTests.nunit
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<NUnitProject>
<Settings processModel="Default" domainUsage="Default" />
<Config name="Debug" appbase="bin/Debug">
<assembly path="net35/mock-assembly.dll" />
<assembly path="net40/mock-assembly.dll" />
<assembly path="net462/mock-assembly.dll" />
<assembly path="net6.0/mock-assembly.dll" />
</Config>
<Config name="Release" appbase="bin/Release">
<assembly path="net35/mock-assembly.dll" />
<assembly path="net40/mock-assembly.dll" />
<assembly path="net462/mock-assembly.dll" />
<assembly path="net6.0/mock-assembly.dll" />
</Config>
</NUnitProject>
43 changes: 19 additions & 24 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -212,16 +212,16 @@ Task("CheckForTestErrors")
.Does(() => DisplayUnreportedErrors());

//////////////////////////////////////////////////////////////////////
// TEST .NET 2.0 ENGINE CORE
// TEST .NET 4.6.2 ENGINE CORE
//////////////////////////////////////////////////////////////////////

Task("TestNet20EngineCore")
Task("TestNet462EngineCore")
.Description("Tests the engine core assembly")
.IsDependentOn("Build")
.OnError(exception => { UnreportedErrors.Add(exception.Message); })
.Does(() =>
{
RunNUnitLiteTests(NETFX_ENGINE_CORE_TESTS, "net35");
RunNUnitLiteTests(NETFX_ENGINE_CORE_TESTS, "net462");
});

//////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -277,16 +277,16 @@ Task("TestNet60EngineCore")
});

//////////////////////////////////////////////////////////////////////
// TEST .NET 2.0 ENGINE
// TEST .NET 4.6.2 ENGINE
//////////////////////////////////////////////////////////////////////

Task("TestNet20Engine")
Task("TestNet462Engine")
.Description("Tests the engine")
.IsDependentOn("Build")
.OnError(exception => { UnreportedErrors.Add(exception.Message); })
.Does(() =>
{
RunNUnitLiteTests(NETFX_ENGINE_TESTS, "net35");
RunNUnitLiteTests(NETFX_ENGINE_TESTS, "net462");
});

//////////////////////////////////////////////////////////////////////
Expand All @@ -303,16 +303,16 @@ Task("TestNetStandard20Engine")
});

//////////////////////////////////////////////////////////////////////
// TEST .NET 2.0 CONSOLE
// TEST .NET 4.6.2 CONSOLE
//////////////////////////////////////////////////////////////////////

Task("TestNet20Console")
.Description("Tests the .NET 2.0 console runner")
Task("TestNet462Console")
.Description("Tests the .NET 4.6.2 console runner")
.IsDependentOn("Build")
.OnError(exception => { UnreportedErrors.Add(exception.Message); })
.Does(() =>
{
RunNet20Console(CONSOLE_TESTS, "net35");
RunNet462Console(CONSOLE_TESTS, "net462");
});

//////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -376,18 +376,13 @@ Task("CreateMsiImage")
CopyFiles(
new FilePath[] { "LICENSE.txt", "NOTICES.txt", "CHANGES.txt", "nunit.ico" },
MSI_IMG_DIR);
CopyDirectory(MSI_DIR + "resources/", MSI_IMG_DIR);
CopyDirectory(BIN_DIR, MSI_IMG_DIR + "bin/");

foreach (var framework in new[] { "net20", "net35" })
{
var addinsImgDir = MSI_IMG_DIR + "bin/" + framework + "/addins/";

CopyDirectory(MSI_DIR + "resources/", MSI_IMG_DIR);
CleanDirectory(addinsImgDir);

foreach (var packageDir in System.IO.Directory.GetDirectories(EXTENSIONS_DIR))
CopyPackageContents(packageDir, addinsImgDir);
}
var addinsImgDir = MSI_IMG_DIR + "bin/net462/addins/";
CreateDirectory(addinsImgDir);
foreach (var packageDir in System.IO.Directory.GetDirectories(EXTENSIONS_DIR))
CopyPackageContents(packageDir, addinsImgDir);
});

//////////////////////////////////////////////////////////////////////
Expand All @@ -404,7 +399,7 @@ Task("CreateZipImage")
ZIP_IMG_DIR);
CopyDirectory(BIN_DIR, ZIP_IMG_DIR + "bin/");

foreach (var framework in new[] { "net20", "net35" })
foreach (var framework in new[] { "net462" })
{
var frameworkDir = ZIP_IMG_DIR + "bin/" + framework + "/";
CopyFileToDirectory(ZIP_DIR + "nunit.bundle.addins", frameworkDir);
Expand Down Expand Up @@ -735,20 +730,20 @@ Task("CreateProductionRelease")

Task("TestConsole")
.Description("Builds and tests the console runner")
.IsDependentOn("TestNet20Console")
.IsDependentOn("TestNet462Console")
.IsDependentOn("TestNet60Console");

Task("TestEngineCore")
.Description("Builds and tests the engine core assembly")
.IsDependentOn("TestNet20EngineCore")
.IsDependentOn("TestNet462EngineCore")
.IsDependentOn("TestNetStandard20EngineCore")
.IsDependentOn("TestNetCore31EngineCore")
.IsDependentOn("TestNet50EngineCore")
.IsDependentOn("TestNet60EngineCore");

Task("TestEngine")
.Description("Builds and tests the engine assembly")
.IsDependentOn("TestNet20Engine")
.IsDependentOn("TestNet462Engine")
.IsDependentOn("TestNetStandard20Engine");

Task("Test")
Expand Down
2 changes: 1 addition & 1 deletion cake/constants.cake
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var MOCK_ASSEMBLY_PROJECT = SOURCE_DIR + "NUnitEngine/mock-assembly/mock-assembl
var MOCK_ASSEMBLY_X86_PROJECT = SOURCE_DIR + "NUnitEngine/mock-assembly-x86/mock-assembly-x86.csproj";
var NOTEST_PROJECT = SOURCE_DIR + "NUnitEngine/notest-assembly/notest-assembly.csproj";
// Console Runner
var NET20_CONSOLE = BIN_DIR + "net20/nunit3-console.exe";
var NET462_CONSOLE = BIN_DIR + "net462/nunit3-console.exe";
var NET60_CONSOLE = BIN_DIR + "net6.0/nunit3-console.dll";
var NET80_CONSOLE = BIN_DIR + "net8.0/nunit3-console.dll";
// Unit Tests
Expand Down
44 changes: 17 additions & 27 deletions cake/package-definitions.cake
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,16 @@ public void InitializePackageDefinitions(ICakeContext context)
// Tests run for all runner packages except NETCORE runner
var StandardRunnerTests = new List<PackageTest>
{
Net35Test,
Net35X86Test,
Net40Test,
Net40X86Test,
Net35PlusNet40Test,
Net462Test,
Net462X86Test,
Net462TwoCopiesTest,
NetCore31Test,
Net50Test,
Net60Test,
Net70Test,
Net80Test,
Net50PlusNet60Test,
Net40PlusNet60Test,
Net462PlusNet60Test,
NUnitProjectTest
};

Expand Down Expand Up @@ -80,8 +78,7 @@ public void InitializePackageDefinitions(ICakeContext context)
checks: new PackageCheck[] {
HasFiles("LICENSE.txt", "NOTICES.txt"),
HasDirectory("tools").WithFiles(CONSOLE_FILES).AndFiles(ENGINE_FILES).AndFile("nunit.console.nuget.addins"),
HasDirectory("tools/agents/net20").WithFiles(AGENT_FILES).AndFile("nunit.console.nuget.agent.addins"),
HasDirectory("tools/agents/net40").WithFiles(AGENT_FILES).AndFile("nunit.console.nuget.agent.addins"),
HasDirectory("tools/agents/net462").WithFiles(AGENT_FILES).AndFile("nunit.console.nuget.agent.addins"),
HasDirectory("tools/agents/netcoreapp3.1").WithFiles(AGENT_FILES_NETCORE).AndFile("nunit.console.nuget.agent.addins"),
HasDirectory("tools/agents/net5.0").WithFiles(AGENT_FILES_NETCORE).AndFile("nunit.console.nuget.agent.addins"),
HasDirectory("tools/agents/net6.0").WithFiles(AGENT_FILES_NETCORE).AndFile("nunit.console.nuget.agent.addins"),
Expand All @@ -90,8 +87,7 @@ public void InitializePackageDefinitions(ICakeContext context)
},
symbols: new PackageCheck[] {
HasDirectory("tools").WithFiles(ENGINE_PDB_FILES).AndFile("nunit3-console.pdb"),
HasDirectory("tools/agents/net20").WithFiles(AGENT_PDB_FILES),
HasDirectory("tools/agents/net40").WithFiles(AGENT_PDB_FILES),
HasDirectory("tools/agents/net462").WithFiles(AGENT_PDB_FILES),
HasDirectory("tools/agents/netcoreapp3.1").WithFiles(AGENT_PDB_FILES_NETCORE),
HasDirectory("tools/agents/net5.0").WithFiles(AGENT_PDB_FILES_NETCORE),
HasDirectory("tools/agents/net6.0").WithFiles(AGENT_PDB_FILES_NETCORE),
Expand Down Expand Up @@ -138,8 +134,7 @@ public void InitializePackageDefinitions(ICakeContext context)
source: CHOCO_DIR + "nunit-console-runner.nuspec",
checks: new PackageCheck[] {
HasDirectory("tools").WithFiles("LICENSE.txt", "NOTICES.txt", "VERIFICATION.txt").AndFiles(CONSOLE_FILES).AndFiles(ENGINE_FILES).AndFile("nunit.console.choco.addins"),
HasDirectory("tools/agents/net20").WithFiles(AGENT_FILES).AndFile("nunit.console.choco.agent.addins"),
HasDirectory("tools/agents/net40").WithFiles(AGENT_FILES).AndFile("nunit.console.choco.agent.addins"),
HasDirectory("tools/agents/net462").WithFiles(AGENT_FILES).AndFile("nunit.console.choco.agent.addins"),
HasDirectory("tools/agents/netcoreapp3.1").WithFiles(AGENT_FILES_NETCORE).AndFile("nunit.console.choco.agent.addins"),
HasDirectory("tools/agents/net5.0").WithFiles(AGENT_FILES_NETCORE).AndFile("nunit.console.choco.agent.addins"),
HasDirectory("tools/agents/net6.0").WithFiles(AGENT_FILES_NETCORE).AndFile("nunit.console.choco.agent.addins"),
Expand Down Expand Up @@ -169,19 +164,16 @@ public void InitializePackageDefinitions(ICakeContext context)
source: ZIP_IMG_DIR,
checks: new PackageCheck[] {
HasFiles("LICENSE.txt", "NOTICES.txt", "CHANGES.txt"),
HasDirectory("bin/net20").WithFiles(CONSOLE_FILES).AndFiles(ENGINE_FILES).AndFile("nunit3-console.pdb").AndFiles(ENGINE_PDB_FILES),
HasDirectory("bin/net35").WithFiles(CONSOLE_FILES).AndFiles(ENGINE_FILES).AndFile("nunit3-console.pdb").AndFiles(ENGINE_PDB_FILES),
HasDirectory("bin/net462").WithFiles(CONSOLE_FILES).AndFiles(ENGINE_FILES).AndFile("nunit3-console.pdb").AndFiles(ENGINE_PDB_FILES),
HasDirectory("bin/netstandard2.0").WithFiles(ENGINE_FILES).AndFiles(ENGINE_PDB_FILES),
HasDirectory("bin/netcoreapp3.1").WithFiles(ENGINE_CORE_FILES).AndFiles(ENGINE_CORE_PDB_FILES),
//HasDirectory("bin/net5.0").WithFiles(ENGINE_FILES).AndFiles(ENGINE_PDB_FILES),
HasDirectory("bin/agents/net20").WithFiles(AGENT_FILES).AndFiles(AGENT_PDB_FILES),
HasDirectory("bin/agents/net40").WithFiles(AGENT_FILES).AndFiles(AGENT_PDB_FILES),
HasDirectory("bin/agents/net462").WithFiles(AGENT_FILES).AndFiles(AGENT_PDB_FILES),
HasDirectory("bin/agents/net5.0").WithFiles(AGENT_FILES_NETCORE).AndFiles(AGENT_PDB_FILES_NETCORE),
HasDirectory("bin/agents/net6.0").WithFiles(AGENT_FILES_NETCORE).AndFiles(AGENT_PDB_FILES_NETCORE),
HasDirectory("bin/agents/net7.0").WithFiles(AGENT_FILES_NETCORE).AndFiles(AGENT_PDB_FILES_NETCORE),
HasDirectory("bin/agents/net8.0").WithFiles(AGENT_FILES_NETCORE).AndFiles(AGENT_PDB_FILES_NETCORE)
},
executable: "bin/net20/nunit3-console.exe",
executable: "bin/net462/nunit3-console.exe",
tests: StandardRunnerTests),

// NOTE: Packages below this point have no direct tests
Expand All @@ -193,18 +185,16 @@ public void InitializePackageDefinitions(ICakeContext context)
source: NUGET_DIR + "engine/nunit.engine.nuspec",
checks: new PackageCheck[] {
HasFiles("LICENSE.txt", "NOTICES.txt"),
HasDirectory("lib/net20").WithFiles(ENGINE_FILES),
HasDirectory("lib/net462").WithFiles(ENGINE_FILES),
HasDirectory("lib/netstandard2.0").WithFiles(ENGINE_FILES),
HasDirectory("contentFiles/any/lib/net20").WithFile("nunit.engine.nuget.addins"),
HasDirectory("contentFiles/any/lib/net462").WithFile("nunit.engine.nuget.addins"),
HasDirectory("contentFiles/any/lib/netstandard2.0").WithFile("nunit.engine.nuget.addins"),
HasDirectory("contentFiles/any/agents/net20").WithFiles(AGENT_FILES).AndFile("nunit.agent.addins"),
HasDirectory("contentFiles/any/agents/net40").WithFiles(AGENT_FILES).AndFile("nunit.agent.addins")
HasDirectory("contentFiles/any/agents/net462").WithFiles(AGENT_FILES).AndFile("nunit.agent.addins")
},
symbols: new PackageCheck[] {
HasDirectory("lib/net20").WithFiles(ENGINE_PDB_FILES),
HasDirectory("lib/net462").WithFiles(ENGINE_PDB_FILES),
HasDirectory("lib/netstandard2.0").WithFiles(ENGINE_PDB_FILES),
HasDirectory("contentFiles/any/agents/net20").WithFiles(AGENT_PDB_FILES),
HasDirectory("contentFiles/any/agents/net40").WithFiles(AGENT_PDB_FILES)
HasDirectory("contentFiles/any/agents/net462").WithFiles(AGENT_PDB_FILES)
}),

NUnitEngineApiPackage = new NuGetPackage(
Expand All @@ -214,11 +204,11 @@ public void InitializePackageDefinitions(ICakeContext context)
source: NUGET_DIR + "engine/nunit.engine.api.nuspec",
checks: new PackageCheck[] {
HasFile("LICENSE.txt"),
HasDirectory("lib/net20").WithFile("nunit.engine.api.dll"),
HasDirectory("lib/net462").WithFile("nunit.engine.api.dll"),
HasDirectory("lib/netstandard2.0").WithFile("nunit.engine.api.dll"),
},
symbols: new PackageCheck[] {
HasDirectory("lib/net20").WithFile("nunit.engine.api.pdb"),
HasDirectory("lib/net462").WithFile("nunit.engine.api.pdb"),
HasDirectory("lib/netstandard2.0").WithFile("nunit.engine.api.pdb")
})
});
Expand Down
3 changes: 1 addition & 2 deletions cake/package-tester.cake
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ public class PackageTester
// do a full install so we simulate the user portion of the install,
// copying certain files to their final destination.
Console.WriteLine("Copying agent files");
_context.CopyFiles(filesToCopy, binDir + "agents/net20");
_context.CopyFiles(filesToCopy, binDir + "agents/net40");
_context.CopyFiles(filesToCopy, binDir + "agents/net462");
}
}
else
Expand Down
Loading

0 comments on commit 54b4b5b

Please sign in to comment.