Skip to content
This repository was archived by the owner on Nov 15, 2021. It is now read-only.
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
38 changes: 19 additions & 19 deletions main/OpenCover.NugetPackage/OpenCover.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,26 @@
<tags>Code-Coverage Reporting Testing TDD Utility</tags>
</metadata>
<files>
<file src="main\bin\Release\x64\OpenCover.Profiler.dll" target="x64"/>
<file src="main\bin\Release\x86\OpenCover.Profiler.dll" target="x86"/>
<file src="main\bin\Release\Gendarme.Framework.dll"/>
<file src="main\bin\Release\Gendarme.Rules.Maintainability.dll"/>
<file src="main\bin\Release\Autofac.dll"/>
<file src="main\bin\Release\Autofac.Configuration.dll"/>
<file src="main\bin\Release\Mono.Cecil.dll"/>
<file src="main\bin\Release\Mono.Cecil.Pdb.dll"/>
<file src="main\bin\Release\Mono.Cecil.Mdb.dll"/>
<file src="main\bin\Release\x64\OpenCover.Profiler.dll" target="tools\x64"/>
<file src="main\bin\Release\x86\OpenCover.Profiler.dll" target="tools\x86"/>
<file src="main\bin\Release\Gendarme.Framework.dll" target="tools"/>
<file src="main\bin\Release\Gendarme.Rules.Maintainability.dll" target="tools"/>
<file src="main\bin\Release\Autofac.dll" target="tools"/>
<file src="main\bin\Release\Autofac.Configuration.dll" target="tools"/>
<file src="main\bin\Release\Mono.Cecil.dll" target="tools"/>
<file src="main\bin\Release\Mono.Cecil.Pdb.dll" target="tools"/>
<file src="main\bin\Release\Mono.Cecil.Mdb.dll" target="tools"/>
<file src="License.rtf"/>
<file src="main\OpenCover.NugetPackage\readme.txt"/>
<file src="main\bin\Release\OpenCover.Console.exe"/>
<file src="main\bin\Release\OpenCover.Console.pdb"/>
<file src="main\bin\Release\OpenCover.Console.exe.config"/>
<file src="main\bin\Release\OpenCover.Framework.dll"/>
<file src="main\bin\Release\OpenCover.Framework.pdb"/>
<file src="main\bin\Release\OpenCover.Extensions.dll"/>
<file src="main\bin\Release\OpenCover.Extensions.pdb"/>
<file src="main\bin\Release\log4net.config"/>
<file src="main\bin\Release\log4net.dll"/>
<file src="main\bin\Release\OpenCover.Console.exe" target="tools"/>
<file src="main\bin\Release\OpenCover.Console.pdb" target="tools"/>
<file src="main\bin\Release\OpenCover.Console.exe.config" target="tools"/>
<file src="main\bin\Release\OpenCover.Framework.dll" target="tools"/>
<file src="main\bin\Release\OpenCover.Framework.pdb" target="tools"/>
<file src="main\bin\Release\OpenCover.Extensions.dll" target="tools"/>
<file src="main\bin\Release\OpenCover.Extensions.pdb" target="tools"/>
<file src="main\bin\Release\log4net.config" target="tools"/>
<file src="main\bin\Release\log4net.dll" target="tools"/>
<file src="main\OpenCover.Documentation\Usage.rtf" target="docs"/>
<file src="ReleaseNotes.txt" target="docs" />
<file src="main\bin\Release\OpenCover.MSBuild.dll" target="MSBuild"/>
Expand All @@ -61,4 +61,4 @@
<file src="samples\SampleSln\BomTest\Properties\AssemblyInfo.cs" target="SampleSln\BomTest\Properties"/>

</files>
</package>
</package>
6 changes: 3 additions & 3 deletions main/OpenCover.Specs/Packaging.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Feature: Packaging
Feature: Packaging
In order to avoid deployment issues
As a software packager
I want to be sure that opencover runs after installation
Expand All @@ -15,8 +15,8 @@ Scenario: Run OpenCover after installing from zip file
Scenario: Run OpenCover after installing from a nuget package
Given I have a valid nugetpackage in the output folder
And I unpack that package into a deployment folder
When I execute the deployed OpenCover against the x86 target application
And I execute the deployed OpenCover against the x64 target application
When I execute the deployed OpenCover against the x86 target application in subfolder tools
And I execute the deployed OpenCover against the x64 target application in subfolder tools
Then the coverage results should be the same

@msitag
Expand Down
14 changes: 8 additions & 6 deletions main/OpenCover.Specs/Packaging.feature.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 14 additions & 9 deletions main/OpenCover.Specs/Steps/PackagingSteps.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
Expand Down Expand Up @@ -57,7 +57,7 @@ public void GivenIHaveAValidZipPackageInTheOutputFolder()
ScenarioContext.Current["targetFolder"] = targetFolder;
ScenarioContext.Current["targetOutput"] = targetOutput;
}

[Given(@"I (?:unzip|unpack) that package into a deployment folder")]
public void GivenIUnzipThatPackageIntoADeploymentFolder()
{
Expand All @@ -66,7 +66,7 @@ public void GivenIUnzipThatPackageIntoADeploymentFolder()
var zip = new ZipFile((string)ScenarioContext.Current["targetZip"]);
zip.ExtractAll(folder);
}

[Given(@"I have a valid nugetpackage in the output folder")]
public void GivenIHaveAValidNugetpackageInTheOutputFolder()
{
Expand All @@ -84,7 +84,7 @@ public void GivenIHaveAValidNugetpackageInTheOutputFolder()
ScenarioContext.Current["targetFolder"] = targetFolder;
ScenarioContext.Current["targetOutput"] = targetOutput;
}

[Given(@"I have a valid installer in the output folder")]
public void GivenIHaveAValidInstallerInTheOutputFolder()
{
Expand All @@ -102,7 +102,7 @@ public void GivenIHaveAValidInstallerInTheOutputFolder()
ScenarioContext.Current["targetFolder"] = targetFolder;
ScenarioContext.Current["targetOutput"] = targetOutput;
}

[Given(@"I install that package into a deployment folder")]
public void GivenIInstallThatPackageIntoADeploymentFolder()
{
Expand All @@ -119,9 +119,15 @@ public void GivenIInstallThatPackageIntoADeploymentFolder()

ScenarioContext.Current["targetFolder"] = Path.Combine(folder, "[ApplicationFolderName]");
}

[When(@"I execute the deployed OpenCover against the (x\d\d) target application")]
public void WhenIExecuteTheDeployedOpenCoverAgainstTheXTargetApplication(string binFolder)
{
this.WhenIExecuteTheDeployedOpenCoverAgainstTheXTargetApplicationInSubfolder(binFolder, string.Empty);
}

[When(@"I execute the deployed OpenCover against the (x\d\d) target application in subfolder (.*)")]
public void WhenIExecuteTheDeployedOpenCoverAgainstTheXTargetApplicationInSubfolder(string binFolder, string subfolder)
{
var folder = (string)ScenarioContext.Current["targetFolder"];
var output = (string)ScenarioContext.Current["targetOutput"];
Expand All @@ -131,7 +137,7 @@ public void WhenIExecuteTheDeployedOpenCoverAgainstTheXTargetApplication(string

if (File.Exists(outputXml)) File.Delete(outputXml);

var openCover = Path.Combine(folder, "OpenCover.Console.exe");
var openCover = Path.Combine(folder, subfolder, "OpenCover.Console.exe");
var target = Path.Combine(folder, string.Format(@"Samples\{0}\OpenCover.Simple.Target.exe", binFolder));
var startInfo = new ProcessStartInfo(openCover);
startInfo.Arguments = string.Format(@"-register:user ""-target:{0}"" ""-output:{1}""", target, outputXml);
Expand All @@ -140,7 +146,6 @@ public void WhenIExecuteTheDeployedOpenCoverAgainstTheXTargetApplication(string
process.WaitForExit();
}


[Then(@"the coverage results should be the same")]
public void ThenTheCoverageResultsShouldBeTheSame()
{
Expand All @@ -153,7 +158,7 @@ public void ThenTheCoverageResultsShouldBeTheSame()

var outputXml86 = string.Format(@"{0}\{1}_{2}.{3}",
Path.GetDirectoryName(output), Path.GetFileNameWithoutExtension(output), "x86", Path.GetExtension(output));

var outputXml64 = string.Format(@"{0}\{1}_{2}.{3}",
Path.GetDirectoryName(output), Path.GetFileNameWithoutExtension(output), "x86", Path.GetExtension(output));

Expand Down