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

Remove teamcity listener from nunit build #1704

Merged
merged 1 commit into from
Jul 28, 2016
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
51 changes: 14 additions & 37 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ var ErrorDetail = new List<string>();
var version = "3.5.0";
var modifier = "";

//For now, set teamcity extension verson and modifier separately
var tcVersion = "1.0.1";
var tcModifier = "";

var isCompactFrameworkInstalled = FileExists(Environment.GetEnvironmentVariable("windir") + "\\Microsoft.NET\\Framework\\v3.5\\Microsoft.CompactFramework.CSharp.targets");

//Find program files on 32-bit or 64-bit Windows
Expand All @@ -31,7 +27,6 @@ var isSilverlightSDKInstalled = FileExists(programFiles + "\\MSBuild\\Microsoft
var isAppveyor = BuildSystem.IsRunningOnAppVeyor;
var dbgSuffix = configuration == "Debug" ? "-dbg" : "";
var packageVersion = version + modifier + dbgSuffix;
var teamcityVersion = tcVersion + tcModifier + dbgSuffix;

//////////////////////////////////////////////////////////////////////
// SUPPORTED FRAMEWORKS
Expand Down Expand Up @@ -115,7 +110,6 @@ Task("InitializeBuild")
if (tag.IsTag)
{
packageVersion = tag.Name;
// NOTE: tag doesn't currently change the TeamCity version
}
else
{
Expand All @@ -135,7 +129,6 @@ Task("InitializeBuild")
suffix = suffix.Substring(0, 21);

packageVersion = version + suffix;
teamcityVersion = tcVersion + suffix;
}

AppVeyor.UpdateBuildVersion(packageVersion);
Expand Down Expand Up @@ -278,7 +271,6 @@ Task("BuildEngine")
BuildProject("./src/NUnitEngine/Addins/vs-project-loader/vs-project-loader.csproj", configuration);
BuildProject("./src/NUnitEngine/Addins/nunit-v2-result-writer/nunit-v2-result-writer.csproj", configuration);
BuildProject("./src/NUnitEngine/Addins/nunit.v2.driver/nunit.v2.driver.csproj", configuration);
BuildProject("./src/NUnitEngine/Addins/teamcity-event-listener/teamcity-event-listener.csproj", configuration);

// Addin tests
BuildProject("./src/NUnitEngine/Addins/addin-tests/addin-tests.csproj", configuration);
Expand Down Expand Up @@ -510,7 +502,6 @@ var BinFiles = new FilePath[]
"addins/nunit.core.interfaces.dll",
"addins/nunit.v2.driver.dll",
"addins/vs-project-loader.dll",
"addins/teamcity-event-listener.dll",
"addins/tests/addin-tests.dll",
"addins/tests/nunit-project-loader.dll",
"addins/tests/nunit.engine.api.dll",
Expand Down Expand Up @@ -704,15 +695,6 @@ Task("PackageExtensions")
OutputDirectory = PACKAGE_DIR,
NoPackageAnalysis = true
});

NuGetPack("nuget/extensions/teamcity-event-listener.nuspec", new NuGetPackSettings()
{
// The teamcity-event-listener extension uses its own versioning
Version = teamcityVersion,
BasePath = currentImageDir,
OutputDirectory = PACKAGE_DIR,
NoPackageAnalysis = true
});
});

Task("PackageConsole")
Expand All @@ -723,7 +705,6 @@ Task("PackageConsole")

CreateDirectory(PACKAGE_DIR);

// Package Runners
NuGetPack("nuget/runners/nunit.console-runner.nuspec", new NuGetPackSettings()
{
Version = packageVersion,
Expand All @@ -732,11 +713,21 @@ Task("PackageConsole")
NoPackageAnalysis = true
});

// NOTE: We can't use NuGetPack for these because our current version
// of Cake doesn't support the Properties option.
PackageRunnerWithExtensions("nuget/runners/nunit.console-runner-with-extensions.nuspec", packageVersion, teamcityVersion, currentImageDir, PACKAGE_DIR);
NuGetPack("nuget/runners/nunit.console-runner-with-extensions.nuspec", new NuGetPackSettings()
{
Version = packageVersion,
BasePath = currentImageDir,
OutputDirectory = PACKAGE_DIR,
NoPackageAnalysis = true
});

PackageRunnerWithExtensions("nuget/runners/nunit.runners.nuspec", packageVersion, teamcityVersion, currentImageDir, PACKAGE_DIR);
NuGetPack("nuget/runners/nunit.runners.nuspec", new NuGetPackSettings()
{
Version = packageVersion,
BasePath = currentImageDir,
OutputDirectory = PACKAGE_DIR,
NoPackageAnalysis = true
});
});

Task("PackageZip")
Expand Down Expand Up @@ -931,20 +922,6 @@ void RunTest(FilePath exePath, DirectoryPath workingDir, string arguments, strin
errorDetail.Add(string.Format("{0} returned rc = {1}", exePath, rc));
}

//////////////////////////////////////////////////////////////////////
// HELPER METHODS - PACKAGING
//////////////////////////////////////////////////////////////////////

void PackageRunnerWithExtensions(string package, string version, string tcVersion, string imageDir, string packageDir)
{
var arguments = string.Format(
"pack {0} -Version {1} -Properties teamcityVersion={2} -BasePath {3} -OutputDirectory {4} -NoPackageAnalysis",
package, version, tcVersion, imageDir, packageDir);
var nugetPath = File("tools/nuget.exe");

StartProcess(nugetPath, arguments);
}

//////////////////////////////////////////////////////////////////////
// TASK TARGETS
//////////////////////////////////////////////////////////////////////
Expand Down
7 changes: 0 additions & 7 deletions install/runners/addin-files.wxi
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,5 @@
Source="$(var.Binaries)\addins\nunit.core.interfaces.dll" />
</Component>
</ComponentGroup>

<ComponentGroup Id="TEAMCITY.EVENT.LISTENER" Directory="ADDINS">
<Component Id="TEAMCITY.EVENT.LISTENER" Location="local" Guid="">
<File Id="teamcity_event_listener.dll"
Source="$(var.Binaries)\addins\teamcity-event-listener.dll" />
</Component>
</ComponentGroup>
</Fragment>
</Include>
6 changes: 0 additions & 6 deletions install/runners/runner-features.wxi
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@
Description="Allows you to write test results out in the NUnit 2.x format">
<ComponentGroupRef Id="ADDINS.NUNIT.V2.WRITER" />
</Feature>
<Feature Id="TEAMCITY.EVENT.LISTENER"
Level="1"
Title="TeamCity Event Listener"
Description="Provides special progress messages when running under TeamCity">
<ComponentGroupRef Id="TEAMCITY.EVENT.LISTENER" />
</Feature>
</Feature>

<Feature Id="NUNIT.CONSOLE"
Expand Down
6 changes: 2 additions & 4 deletions nuget/runners/nunit.console-runner-with-extensions.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<projectUrl>http://nunit.org</projectUrl>
<iconUrl>http://nunit.org/nuget/nunitv3_32x32.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<summary>Console runner for version 3.0 of the NUnit unit-testing framework with common extensions.</summary>
<summary>Console runner for version 3.0 of the NUnit unit-testing framework with selected extensions.</summary>
<description>
This package includes the nunit3-console runner and test engine for version 3.0 of the NUnit unit-testing framework.

Expand All @@ -19,11 +19,10 @@
* VSProjectLoader - loads tests from Visual Studio projects
* NUnitV2ResultWriter - saves results in NUnit V2 format.
* NUnitV2FrameworkDriver - runs NUnit V2 tests.
* TeamCityEventListener - enables use of the --teamcity option of the console runner.

Other extensions, if needed, must be installed separately.
</description>
<releaseNotes></releaseNotes>
<releaseNotes>This release removes the TeamCityEventListener extension, which must now be installed separately.</releaseNotes>
<language>en-US</language>
<tags>nunit test testing tdd runner</tags>
<copyright>Copyright (c) 2016 Charlie Poole</copyright>
Expand All @@ -34,7 +33,6 @@
<dependency id="NUnit.Extension.VSProjectLoader" version="$version$" />
<dependency id="NUnit.Extension.NUnitV2ResultWriter" version="$version$" />
<dependency id="NUnit.Extension.NUnitV2Driver" version="$version$" />
<dependency id="NUnit.Extension.TeamCityEventListener" version="$teamcityVersion$" />
</group>
</dependencies>
</metadata>
Expand Down
2 changes: 1 addition & 1 deletion nuget/runners/nunit.console-runner.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<description>
This package includes the nunit3-console runner and test engine for version 3.0 of the NUnit unit-testing framework.

Any extensions, if needed, must be installed as separate packages.
Any extensions, if needed, may be installed as separate packages.
</description>
<releaseNotes></releaseNotes>
<language>en-US</language>
Expand Down
21 changes: 14 additions & 7 deletions nuget/runners/nunit.runners.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,29 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>NUnit.Runners</id>
<title>NUnit Console Version 3</title>
<title>NUnit Console Version 3 With Extensions</title>
<version>$version$</version>
<authors>Charlie Poole</authors>
<owners>Charlie Poole</owners>
<licenseUrl>http://nunit.org/nuget/nunit3-license.txt</licenseUrl>
<projectUrl>http://nunit.org</projectUrl>
<iconUrl>http://nunit.org/nuget/nunitv3_32x32.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<summary>Console runner for version 3.0 of the NUnit unit-testing framework.</summary>
<description>This package is now a reference to the NUnit.Console package, which provides the nunit3-console runner and test engine for version 3.0 of the NUnit unit-testing framework.
<summary>Console runner for version 3.0 of the NUnit unit-testing framework with selected extensions</summary>
<description>
This package includes the nunit3-console runner and test engine for version 3.0 of the NUnit unit-testing framework.

The runner will run 2.6 tests using the included plugin.
The following extensions are included with this package:
* NUnitProjectLoader - loads tests from NUnit projects
* VSProjectLoader - loads tests from Visual Studio projects
* NUnitV2ResultWriter - saves results in NUnit V2 format.
* NUnitV2FrameworkDriver - runs NUnit V2 tests.

Users may update their projects to use the NUnit.Console package directly if desired.</description>
<releaseNotes>This package no longer contains the gui and pnunit runners, which were in earlier releases. Those runners do not exist for NUnit 3.0 at this time.</releaseNotes>
Other extensions, if needed, must be installed separately.

This package is being replaced by the NUnit.Console package. Users may update their projects to use the NUnit.Console package directly if desired.
</description>
<releaseNotes>This release removes the TeamCityEventListener extension, which must now be installed separately.</releaseNotes>
<language>en-US</language>
<tags>nunit test testing tdd runner</tags>
<copyright>Copyright (c) 2016 Charlie Poole</copyright>
Expand All @@ -27,7 +35,6 @@ Users may update their projects to use the NUnit.Console package directly if des
<dependency id="NUnit.Extension.VSProjectLoader" version="$version$" />
<dependency id="NUnit.Extension.NUnitV2ResultWriter" version="$version$" />
<dependency id="NUnit.Extension.NUnitV2Driver" version="$version$" />
<dependency id="NUnit.Extension.TeamCityEventListener" version="$teamcityVersion$" />
</group>
</dependencies>
</metadata>
Expand Down
7 changes: 0 additions & 7 deletions nunit.sln
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunit.testdata-3.5", "src\N
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunit.framework.tests-3.5", "src\NUnitFramework\tests\nunit.framework.tests-3.5.csproj", "{B93FC354-D59D-4650-84E4-7FCA7D51689A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "teamcity-event-listener", "src\NUnitEngine\Addins\teamcity-event-listener\teamcity-event-listener.csproj", "{A867079B-A172-4DAE-9549-63B331092A23}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -461,10 +459,6 @@ Global
{B93FC354-D59D-4650-84E4-7FCA7D51689A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B93FC354-D59D-4650-84E4-7FCA7D51689A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B93FC354-D59D-4650-84E4-7FCA7D51689A}.Release|Any CPU.Build.0 = Release|Any CPU
{A867079B-A172-4DAE-9549-63B331092A23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A867079B-A172-4DAE-9549-63B331092A23}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A867079B-A172-4DAE-9549-63B331092A23}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A867079B-A172-4DAE-9549-63B331092A23}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -544,7 +538,6 @@ Global
{C6156B98-923A-474B-B257-29107476E93C} = {49BF96D3-3F1B-4553-BE55-296FA7C3F659}
{520F4C89-51B6-49D6-9ED7-4523048C0154} = {49BF96D3-3F1B-4553-BE55-296FA7C3F659}
{B93FC354-D59D-4650-84E4-7FCA7D51689A} = {49BF96D3-3F1B-4553-BE55-296FA7C3F659}
{A867079B-A172-4DAE-9549-63B331092A23} = {B923C1E7-54DD-4E79-A1A9-B21123863B04}
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = src\NUnitFramework\tests\nunitlite.tests-2.0.csproj
Expand Down
Loading