|
|
@@ -16,9 +16,6 @@ $signClientAppPath = Join-Path (Join-Path (Join-Path .\Packages "SignClient") "T
|
|
|
#remove any old coverage file
|
|
|
md -Force $outputLocation | Out-Null
|
|
|
$outputPath = (Resolve-Path $outputLocation).Path
|
|
|
-$outputFileDotCover1 = Join-Path $outputPath -childpath 'coverage-rx1.dcvr'
|
|
|
-$outputFileDotCover2 = Join-Path $outputPath -childpath 'coverage-rx2.dcvr'
|
|
|
-$outputFileDotCover = Join-Path $outputPath -childpath 'coverage-rx.dcvr'
|
|
|
$outputFile = Join-Path $outputPath -childpath 'coverage-rx.xml'
|
|
|
Remove-Item $outputPath -Force -Recurse
|
|
|
md -Force $outputLocation | Out-Null
|
|
|
@@ -30,7 +27,7 @@ if (!(Test-Path .\nuget.exe)) {
|
|
|
# get tools
|
|
|
.\nuget.exe install -excludeversion SignClient -Version 0.7.0 -outputdirectory packages
|
|
|
.\nuget.exe install -excludeversion JetBrains.dotCover.CommandLineTools -pre -outputdirectory packages
|
|
|
-.\nuget.exe install -excludeversion Nerdbank.GitVersioning -Version 2.0.21-beta -pre -outputdirectory packages
|
|
|
+.\nuget.exe install -excludeversion Nerdbank.GitVersioning -Version 2.0.37-beta -pre -outputdirectory packages
|
|
|
.\nuget.exe install -excludeversion xunit.runner.console -pre -outputdirectory packages
|
|
|
#.\nuget.exe install -excludeversion OpenCover -Version 4.6.519 -outputdirectory packages
|
|
|
.\nuget.exe install -excludeversion ReportGenerator -outputdirectory packages
|
|
|
@@ -109,9 +106,9 @@ $testDirectory = Join-Path $scriptPath "tests\Tests.System.Reactive"
|
|
|
|
|
|
# OpenCover isn't working currently. So run tests on CI and coverage with JetBrains
|
|
|
|
|
|
-# Run .NET Core only for now until perf improves on the runner for .net desktop
|
|
|
+# Use xUnit CLI as it's significantly faster than vstest (dotnet test)
|
|
|
$dotnet = "$env:ProgramFiles\dotnet\dotnet.exe"
|
|
|
-.\packages\JetBrains.dotCover.CommandLineTools\tools\dotCover.exe cover /targetexecutable="$dotnet" /targetworkingdir="$testDirectory" /targetarguments="test -c $configuration --no-build -f netcoreapp1.1 --filter:SkipCI!=true" /output="$outputFileDotCover1" /Filters="+:module=System.Reactive;+:module=Microsoft.Reactive.Testing;+:module=System.Reactive.Observable.Aliases;-:type=Xunit*" /DisableDefaultFilters /ReturnTargetExitCode /AttributeFilters="System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute"
|
|
|
+.\packages\JetBrains.dotCover.CommandLineTools\tools\dotCover.exe analyse /targetexecutable="$dotnet" /targetworkingdir="$testDirectory" /targetarguments="xunit -c $configuration --no-build -notrait 'SkipCI!=true'" /Filters="+:module=System.Reactive;+:module=Microsoft.Reactive.Testing;+:module=System.Reactive.Observable.Aliases;-:type=Xunit*" /DisableDefaultFilters /ReturnTargetExitCode /AttributeFilters="System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute" /Output="$outputFile" /ReportType=DetailedXML /HideAutoProperties
|
|
|
|
|
|
if ($LastExitCode -ne 0) {
|
|
|
Write-Host "Error with tests" -Foreground Red
|
|
|
@@ -121,26 +118,6 @@ if ($LastExitCode -ne 0) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-# run .net desktop tests
|
|
|
-.\packages\JetBrains.dotCover.CommandLineTools\tools\dotCover.exe cover /targetexecutable="$xUnitConsolePath" /targetworkingdir="$testDirectory\bin\$configuration\net46\" /targetarguments="Tests.System.Reactive.dll -notrait SkipCI=true" /output="$outputFileDotCover2" /Filters="+:module=System.Reactive;+:module=Microsoft.Reactive.Testing;+:module=System.Reactive.Observable.Aliases;-:type=Xunit*" /DisableDefaultFilters /ReturnTargetExitCode /AttributeFilters="System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute"
|
|
|
-
|
|
|
-if ($LastExitCode -ne 0) {
|
|
|
- Write-Host "Error with tests" -Foreground Red
|
|
|
- if($isAppVeyor) {
|
|
|
- $host.SetShouldExit($LastExitCode)
|
|
|
- exit $LastExitCode
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-#.\packages\JetBrains.dotCover.CommandLineTools\tools\dotCover.exe analyze /targetexecutable="$dotnet" /targetworkingdir="$testDirectory" /targetarguments="test -c $configuration --no-build --filter:SkipCI!=true" /ReportType=DetailedXML /output="$outputFile" /Filters="+:module=System.Reactive;+:module=Microsoft.Reactive.Testing;+:module=System.Reactive.Observable.Aliases;-:type=Xunit*" /DisableDefaultFilters /HideAutoProperties /ReturnTargetExitCode
|
|
|
-
|
|
|
-
|
|
|
-# For perf, we need to use the xunit console runner, but that generates two reports. merge into one and generate the detailed xml output
|
|
|
-
|
|
|
-.\packages\JetBrains.dotCover.CommandLineTools\tools\dotCover.exe merge /Source="$outputFileDotCover1;$outputFileDotCover2" /Output="$outputFileDotCover"
|
|
|
-.\packages\JetBrains.dotCover.CommandLineTools\tools\dotCover.exe report /Source="$outputFileDotCover" /Output="$outputFile" /ReportType=DetailedXML /HideAutoProperties
|
|
|
-
|
|
|
-
|
|
|
# Either display or publish the results
|
|
|
if ($env:CI -eq 'True')
|
|
|
{
|