From 9b98e190b35e52a579fdbe87659bd58834b607fc Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Wed, 24 Apr 2019 14:41:01 -0700 Subject: [PATCH 1/2] update 'Publish-TestResults' to make AzDO fail the task when any tests failed --- build.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.psm1 b/build.psm1 index 5059be3226c..5f1851419c6 100644 --- a/build.psm1 +++ b/build.psm1 @@ -1253,7 +1253,7 @@ function Publish-TestResults # If the the "test-case" count is greater than 0, then we have results. # Regardless, we want to upload this as an artifact, so this logic doesn't pertain to that. if ( @(([xml](Get-Content $Path)).SelectNodes(".//test-case")).Count -gt 0 -or $Type -eq 'XUnit' ) { - Write-Host "##vso[results.publish type=$Type;mergeResults=true;runTitle=$Title;publishRunAttachments=true;resultFiles=$tempFilePath;]" + Write-Host "##vso[results.publish type=$Type;mergeResults=true;runTitle=$Title;publishRunAttachments=true;resultFiles=$tempFilePath;failTaskOnFailedTests=true]" } $resolvedPath = (Resolve-Path -Path $Path).ProviderPath From 9ee8f97375ce2e833e01c87cc36f621a102ee8e3 Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Thu, 25 Apr 2019 10:12:33 -0700 Subject: [PATCH 2/2] fix set-location test --- .../Microsoft.PowerShell.Management/Set-Location.Tests.ps1 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/powershell/Modules/Microsoft.PowerShell.Management/Set-Location.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Management/Set-Location.Tests.ps1 index 10a276b32b6..06be4473706 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Management/Set-Location.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Management/Set-Location.Tests.ps1 @@ -76,8 +76,7 @@ Describe "Set-Location" -Tags "CI" { $(Get-Location).Path | Should -BeExactly $testPath.FullName } - It "Should use actual casing of folder on case-sensitive filesystem: " -Skip:(!$IsLinux) - { + It "Should use actual casing of folder on case-sensitive filesystem: " -Skip:(!$IsLinux) { $dir = "teST" $testPathLower = New-Item -ItemType Directory -Path (Join-Path $TestDrive $dir.ToLower()) $testPathUpper = New-Item -ItemType Directory -Path (Join-Path $TestDrive $dir.ToUpper()) @@ -85,7 +84,7 @@ Describe "Set-Location" -Tags "CI" { $(Get-Location).Path | Should -BeExactly $testPathLower.FullName Set-Location $testPathUpper.FullName $(Get-Location).Path | Should -BeExactly $testPathUpper.FullName - { Set-Locaiton (Join-Path $TestDrive $dir) } | Should -Throw -ErrorId "PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand" + { Set-Location (Join-Path $TestDrive $dir) -ErrorAction Stop } | Should -Throw -ErrorId "PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand" } Context 'Set-Location with no arguments' {