From d80f36829347d4a9061802f8710560d654fa004f Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Mon, 19 Nov 2018 16:13:20 -0800 Subject: [PATCH 1/4] [Feature] Skip tests on Appveyor due to PSReadline issue --- .../Microsoft.PowerShell.Core/Enter-PSHostProcess.Tests.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/powershell/Modules/Microsoft.PowerShell.Core/Enter-PSHostProcess.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Core/Enter-PSHostProcess.Tests.ps1 index 89cbd54e366..7a3ff6e4f08 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Core/Enter-PSHostProcess.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Core/Enter-PSHostProcess.Tests.ps1 @@ -25,11 +25,13 @@ Describe "Enter-PSHostProcess tests" -Tag Feature { } } - It "Can enter and exit another PSHost" { + # Skip on Appveyor due to PSReadline issue. + It "Can enter and exit another PSHost" -Skip ($env:AppVeyor) { "enter-pshostprocess -id $($pwsh.Id)`n`$pid`nexit-pshostprocess" | pwsh -c - | Should -Be $pwsh.Id } - It "Can enter and exit another Windows PowerShell PSHost" -Skip:(!$IsWindows) { + # Skip on Appveyor due to PSReadline issue. + It "Can enter and exit another Windows PowerShell PSHost" -Skip:(!$IsWindows -or $env:AppVeyor) { "enter-pshostprocess -id $($powershell.Id)`n`$pid`nexit-pshostprocess" | pwsh -c - | Should -Be $powershell.Id } From 04f7ffb40b1402396ab4f3402afb0c918d2bb054 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Mon, 19 Nov 2018 18:09:53 -0800 Subject: [PATCH 2/4] [Feature] From 561d550b7c0a2aec3623be029b078d249cfe9378 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Mon, 19 Nov 2018 18:11:56 -0800 Subject: [PATCH 3/4] [Feature] Fix typo --- .../Microsoft.PowerShell.Core/Enter-PSHostProcess.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/powershell/Modules/Microsoft.PowerShell.Core/Enter-PSHostProcess.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Core/Enter-PSHostProcess.Tests.ps1 index 7a3ff6e4f08..472e7319ad9 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Core/Enter-PSHostProcess.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Core/Enter-PSHostProcess.Tests.ps1 @@ -26,7 +26,7 @@ Describe "Enter-PSHostProcess tests" -Tag Feature { } # Skip on Appveyor due to PSReadline issue. - It "Can enter and exit another PSHost" -Skip ($env:AppVeyor) { + It "Can enter and exit another PSHost" -Skip:($env:AppVeyor) { "enter-pshostprocess -id $($pwsh.Id)`n`$pid`nexit-pshostprocess" | pwsh -c - | Should -Be $pwsh.Id } From 168a8f3bd785a8723679f7442bea7e6fbda6b7a0 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Mon, 19 Nov 2018 21:59:24 -0800 Subject: [PATCH 4/4] [Feature] Add Skip for AppVeyor --- .../Enter-PSHostProcess.Tests.ps1 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/powershell/Modules/Microsoft.PowerShell.Core/Enter-PSHostProcess.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Core/Enter-PSHostProcess.Tests.ps1 index 472e7319ad9..721ea25c003 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Core/Enter-PSHostProcess.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Core/Enter-PSHostProcess.Tests.ps1 @@ -15,6 +15,13 @@ Describe "Enter-PSHostProcess tests" -Tag Feature { $si.FileName = "powershell" $powershell = [System.Diagnostics.Process]::Start($si) } + + if ($env:AppVeyor) { + $IsAppveyor = $true + } + else { + $IsAppveyor = $false + } } AfterAll { @@ -26,12 +33,12 @@ Describe "Enter-PSHostProcess tests" -Tag Feature { } # Skip on Appveyor due to PSReadline issue. - It "Can enter and exit another PSHost" -Skip:($env:AppVeyor) { + It "Can enter and exit another PSHost" -Skip:$IsAppVeyor { "enter-pshostprocess -id $($pwsh.Id)`n`$pid`nexit-pshostprocess" | pwsh -c - | Should -Be $pwsh.Id } # Skip on Appveyor due to PSReadline issue. - It "Can enter and exit another Windows PowerShell PSHost" -Skip:(!$IsWindows -or $env:AppVeyor) { + It "Can enter and exit another Windows PowerShell PSHost" -Skip:(!$IsWindows -or $IsAppVeyor) { "enter-pshostprocess -id $($powershell.Id)`n`$pid`nexit-pshostprocess" | pwsh -c - | Should -Be $powershell.Id }