Skip to content

Commit 7d609c8

Browse files
committed
Merge pull request #1117 from vbfox/dotNetCoverageSettings
Add helpers to send .Net coverage settings to TeamCity
2 parents e537d90 + 99bac13 commit 7d609c8

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

src/app/FakeLib/TeamCityHelper.fs

+29
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,35 @@ let sendTeamCityDotNetDupFinderImport path = sendToTeamCity "##teamcity[importDa
7979
/// Sends an dotcover, partcover, ncover or ncover3 results filename to TeamCity
8080
let sendTeamCityDotNetCoverageImport path = sendToTeamCity "##teamcity[importData type='dotNetCoverage' path='%s']" path
8181

82+
/// Sends the full path to the dotCover home folder to override the bundled dotCover to TeamCity
83+
let sendTeamCityDotCoverHome = sendToTeamCity "##teamcity[dotNetCoverage dotcover_home='%s']"
84+
85+
/// Sends the full path to NCover installation folder to TeamCity
86+
let sendTeamCityNCover3Home = sendToTeamCity "##teamcity[dotNetCoverage ncover3_home='%s']"
87+
88+
/// Sends arguments for the NCover report generator to TeamCity
89+
let sendTeamCityNCover3ReporterArgs = sendToTeamCity "##teamcity[dotNetCoverage ncover3_reporter_args='%s']"
90+
91+
/// Sends the path to NCoverExplorer to TeamCity
92+
let sendTeamCityNCoverExplorerTool = sendToTeamCity "##teamcity[dotNetCoverage ncover_explorer_tool='%s']"
93+
94+
/// Sends additional arguments for NCover 1.x to TeamCity
95+
let sendTeamCityNCoverExplorerToolArgs = sendToTeamCity "##teamcity[dotNetCoverage ncover_explorer_tool_args='%s']"
96+
97+
/// Sends the value for NCover /report: argument to TeamCity
98+
let sendTeamCityNCoverReportType : int -> unit = string >> sendToTeamCity "##teamcity[dotNetCoverage ncover_explorer_report_type='%s']"
99+
100+
/// Sends the value for NCover /sort: argument to TeamCity
101+
let sendTeamCityNCoverReportOrder : int -> unit = string >> sendToTeamCity "##teamcity[dotNetCoverage ncover_explorer_report_order='%s']"
102+
103+
/// Send the PartCover xslt transformation rules (Input xlst and output files) to TeamCity
104+
let sendTeamCityPartCoverReportXslts : seq<string * string> -> unit =
105+
Seq.map (fun (xslt, output) -> sprintf "%s=>%s" xslt output)
106+
>> Seq.map EncapsulateSpecialChars
107+
>> String.concat "|n"
108+
>> sprintf "##teamcity[dotNetCoverage partcover_report_xslts='%s']"
109+
>> sendStrToTeamCity
110+
82111
/// Starts the test case.
83112
let StartTestCase testCaseName =
84113
sendToTeamCity "##teamcity[testStarted name='%s' captureStandardOutput='true']" testCaseName

0 commit comments

Comments
 (0)