|
@@ -27,18 +27,13 @@ if (!(Test-Path .\nuget.exe)) {
|
|
|
# get tools
|
|
|
.\nuget.exe install -excludeversion SignClient -Version 0.5.0-beta4 -pre -outputdirectory packages
|
|
|
#.\nuget.exe install -excludeversion OpenCover -Version 4.6.519 -outputdirectory packages
|
|
|
-.\nuget.exe install -excludeversion ReportGenerator -outputdirectory packages
|
|
|
-.\nuget.exe install -excludeversion coveralls.io -outputdirectory packages
|
|
|
-.\nuget.exe install -excludeversion xunit.runner.console -pre -outputdirectory packages
|
|
|
+#.\nuget.exe install -excludeversion ReportGenerator -outputdirectory packages
|
|
|
+#.\nuget.exe install -excludeversion coveralls.io -outputdirectory packages
|
|
|
|
|
|
New-Item -ItemType Directory -Force -Path $artifacts
|
|
|
|
|
|
Write-Host "Restoring packages for $scriptPath\System.Reactive.sln" -Foreground Green
|
|
|
msbuild "$scriptPath\System.Reactive.sln" /t:restore /p:Configuration=$configuration
|
|
|
-# msbuild "$scriptPath\System.Reactive\System.Reactive.csproj" /t:restore /p:Configuration=$configuration
|
|
|
-# msbuild "$scriptPath\Microsoft.Reactive.Testing\Microsoft.Reactive.Testing.csproj" /t:restore /p:Configuration=$configuration
|
|
|
-# msbuild "$scriptPath\System.Reactive.Observable.Aliases\System.Reactive.Observable.Aliases.csproj" /t:restore /p:Configuration=$configuration
|
|
|
-# msbuild "$scriptPath\Tests.System.Reactive\Tests.System.Reactive.csproj" /t:restore /p:Configuration=$configuration
|
|
|
|
|
|
Write-Host "Building $scriptPath\System.Reactive.sln" -Foreground Green
|
|
|
msbuild "$scriptPath\System.Reactive.sln" /t:build /p:Configuration=$configuration
|
|
@@ -75,13 +70,13 @@ if($hasSignClientSecret) {
|
|
|
Write-Host "Running tests" -Foreground Green
|
|
|
$testDirectory = Join-Path $scriptPath "Tests.System.Reactive"
|
|
|
|
|
|
-dotnet.exe test "$testDirectory\Tests.System.Reactive.csproj" -c $configuration --no-build --filter:SkipCI!=true
|
|
|
+dotnet test "$testDirectory\Tests.System.Reactive.csproj" -c $configuration --no-build --filter:SkipCI!=true
|
|
|
|
|
|
+# We bail out here because OpenCover isn't properly reporting coverage
|
|
|
exit
|
|
|
|
|
|
# Execute OpenCover with a target of "dotnet test"
|
|
|
& $openCoverPath -register:user -oldStyle -mergeoutput -target:dotnet.exe -targetdir:"$testDirectory" -targetargs:"test --no-build --filter:SkipCI!=true" -output:"$outputFile" -skipautoprops -returntargetcode -excludebyattribute:"System.Diagnostics.DebuggerNonUserCodeAttribute;System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute" -nodefaultfilters -hideskipped:All -filter:"+[*]* -[*.Tests]* -[Tests.*]* -[xunit.*]* -[*]Xunit.*"
|
|
|
-#& $openCoverPath -register:user -oldStyle -mergeoutput -target:$xUnitConsolePath -targetdir:"$testDirectory" -targetargs:"$testDirectory\bin\$configuration\net46\Tests.System.Reactive.dll -notrait SkipCI=true" -output:"$outputFile" -skipautoprops -returntargetcode -excludebyattribute:"System.Diagnostics.DebuggerNonUserCodeAttribute;System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute" -nodefaultfilters -hideskipped:All -filter:"+[*]* -[*.Tests]* -[Tests.*]* -[xunit.*]* -[*]Xunit.*"
|
|
|
|
|
|
if ($LastExitCode -ne 0) {
|
|
|
Write-Host "Error with tests" -Foreground Red
|