Merge pull request #505 from hebinhuang/NativeCodeCov
Implement automatic code coverage reports for c++ code
This commit is contained in:
Коммит
ae1494e547
|
@ -41,9 +41,12 @@ test:
|
|||
# scripts to run after tests
|
||||
after_test:
|
||||
- cmd: echo [after_test] ProjectVersion=%ProjectVersion%
|
||||
- .\build\tools\Dynamic-Code-Coverage-Tools\CodeCoverage.exe collect /output:NativeCodeCoverage.coverage .\csharp\packages\NUnit.Console.3.0.1\tools\nunit3-console.exe .\csharp\WorkerTest\bin\Debug\WorkerTest.dll .\csharp\AdapterTest\bin\Debug\AdapterTest.dll
|
||||
- .\build\tools\Dynamic-Code-Coverage-Tools\CodeCoverage.exe analyze /output:NativeCodeCoverage.xml NativeCodeCoverage.coverage
|
||||
- .\csharp\packages\OpenCover.4.6.166\tools\OpenCover.Console.exe -register:user -target:.\csharp\packages\NUnit.Console.3.0.1\tools\nunit3-console.exe -register:user "-targetargs:"".\csharp\WorkerTest\bin\Debug\WorkerTest.dll"" "".\csharp\AdapterTest\bin\Debug\AdapterTest.dll"" " -filter:"+[CSharpWorker*|Microsoft.Spark.CSharp*]*" -excludebyattribute:*.ExcludeFromCodeCoverage* -hideskipped:All -output:.\SparkCLRCodeCoverage.xml
|
||||
- "SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%"
|
||||
- pip install codecov
|
||||
- codecov -f "NativeCodeCoverage.xml"
|
||||
- codecov -f "SparkCLRCodeCoverage.xml"
|
||||
- cmd: cd .\build\localmode
|
||||
- cmd: if not defined ProjectVersion (.\Runsamples.cmd --validate)
|
||||
|
|
|
@ -306,6 +306,25 @@ function Download-BuildTools
|
|||
$envStream.WriteLine("set path=$gpgBin\;%path%");
|
||||
}
|
||||
}
|
||||
|
||||
# Dynamic Code Coverage Tools
|
||||
if ($env:APPVEYOR -eq "true")
|
||||
{
|
||||
$covZip = "$toolsDir\dynamic-code-coverage-tools.zip"
|
||||
if (!(test-path $covZip))
|
||||
{
|
||||
$url = "https://github.com/MobiusForSpark/build/blob/master/tools/dynamic-code-coverage-tools.zip?raw=true"
|
||||
$output=$covZip
|
||||
Download-File $url $output
|
||||
# Unzip-File $output $toolsDir
|
||||
Write-Output "[downloadtools.Download-BuildTools] Extracting $output to $toolsDir ..."
|
||||
Invoke-Expression "& 7z x $output -o$toolsDir"
|
||||
}
|
||||
else
|
||||
{
|
||||
Write-Output "[downloadtools.Download-BuildTools] $covZip exists already. No download and extraction needed"
|
||||
}
|
||||
}
|
||||
|
||||
# Download winutils.exe
|
||||
Download-Winutils
|
||||
|
|
Загрузка…
Ссылка в новой задаче