diff --git a/appveyor.yml b/appveyor.yml index 143f6e2bc..d9e7d643b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -28,23 +28,29 @@ test_script: - ps: | # fail tests execution, if any PS error detected $ErrorActionPreference = 'Stop' + # # CoreCLR $testResultsFile = ".\TestsResults.xml" .\bin\powershell.exe --noprofile -c "Invoke-Pester test/powershell -OutputFormat NUnitXml -OutputFile $testResultsFile" (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $testResultsFile)) - # For now we don't fail the build if these tests failed # # FullCLR Import-Module .\PowerShellGitHubDev.psm1 $testResultsFile = ".\TestsResults.FullCLR.xml" Start-DevPSGitHub -binDir $pwd\binFull -NoNewWindow -ArgumentList '-command', "Import-Module .\bin\Modules\Pester; Invoke-Pester test/fullCLR -OutputFormat NUnitXml -OutputFile $testResultsFile" (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $testResultsFile)) - # we want to fail the build, if these tests failed + # + # Fail the build, if tests failed $x = [xml](cat -raw .\TestsResults.FullCLR.xml) if ([int]$x.'test-results'.failures -gt 0) { throw "$($x.'test-results'.failures) tests in test/fullCLR failed" } + $x = [xml](cat -raw .\TestsResults.xml) + if ([int]$x.'test-results'.failures -gt 0) + { + throw "$($x.'test-results'.failures) tests in test/powershell failed" + } on_finish: - ps: |