From aa7f5232b611b72d8d90d7767e9fc4a52dd1b510 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Fri, 14 Jul 2017 12:02:58 -0700 Subject: [PATCH 1/4] remove counter cmdlets from the build --- .../Microsoft.PowerShell.Commands.Diagnostics.csproj | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Microsoft.PowerShell.Commands.Diagnostics/Microsoft.PowerShell.Commands.Diagnostics.csproj b/src/Microsoft.PowerShell.Commands.Diagnostics/Microsoft.PowerShell.Commands.Diagnostics.csproj index 8be38b7a02a..e47baf5d939 100644 --- a/src/Microsoft.PowerShell.Commands.Diagnostics/Microsoft.PowerShell.Commands.Diagnostics.csproj +++ b/src/Microsoft.PowerShell.Commands.Diagnostics/Microsoft.PowerShell.Commands.Diagnostics.csproj @@ -17,7 +17,15 @@ + + + + + + + + From b79f9ffce46732a77d2bc1d2d2139349733a617b Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Fri, 14 Jul 2017 18:40:16 -0700 Subject: [PATCH 2/4] disable counter tests --- .../Export-Counter.Tests.ps1 | 5 +++++ .../Microsoft.PowerShell.Diagnostics/Get-Counter.Tests.ps1 | 7 ++++++- .../Import-Counter.Tests.ps1 | 4 ++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/test/powershell/Modules/Microsoft.PowerShell.Diagnostics/Export-Counter.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Diagnostics/Export-Counter.Tests.ps1 index 3bcd095c2ee..9089a97d308 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Diagnostics/Export-Counter.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Diagnostics/Export-Counter.Tests.ps1 @@ -2,6 +2,11 @@ # File: Export-Counter.Tests.ps1 # Provides Pester tests for the Export-Counter cmdlet. ############################################################################################> + + # Counter CmdLets are removed see issue #4272 + # Tests are disabled + return + $cmdletName = "Export-Counter" . "$PSScriptRoot/CounterTestHelperFunctions.ps1" diff --git a/test/powershell/Modules/Microsoft.PowerShell.Diagnostics/Get-Counter.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Diagnostics/Get-Counter.Tests.ps1 index 621c3bcc680..7d1f24c93a2 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Diagnostics/Get-Counter.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Diagnostics/Get-Counter.Tests.ps1 @@ -2,7 +2,12 @@ # File: Get-Counter.Tests.ps1 # Provides Pester tests for the Get-Counter cmdlet. ############################################################################################> -$cmdletName = "Get-Counter" + +# Counter CmdLets are removed see issue #4272 +# Tests are disabled + return + + $cmdletName = "Get-Counter" . "$PSScriptRoot/CounterTestHelperFunctions.ps1" diff --git a/test/powershell/Modules/Microsoft.PowerShell.Diagnostics/Import-Counter.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Diagnostics/Import-Counter.Tests.ps1 index 0c71976aef5..0a07e9f940f 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Diagnostics/Import-Counter.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Diagnostics/Import-Counter.Tests.ps1 @@ -3,6 +3,10 @@ # Provides Pester tests for the Import-Counter cmdlet. ############################################################################################> + # Counter CmdLets are removed see issue #4272 + # Tests are disabled + return + $cmdletName = "Import-Counter" . "$PSScriptRoot/CounterTestHelperFunctions.ps1" From ee12af01ed2e604cb522db46661a8971728001db Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 18 Jul 2017 16:41:48 -0700 Subject: [PATCH 3/4] fix tests [Feature] --- test/powershell/Host/TabCompletion/TabCompletion.Tests.ps1 | 2 +- test/powershell/engine/DefaultCommands.Tests.ps1 | 6 +++--- test/powershell/engine/Help/assets/HelpURI/V2Cmdlets.csv | 3 --- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/test/powershell/Host/TabCompletion/TabCompletion.Tests.ps1 b/test/powershell/Host/TabCompletion/TabCompletion.Tests.ps1 index 710c4c19144..0922c8fb74a 100644 --- a/test/powershell/Host/TabCompletion/TabCompletion.Tests.ps1 +++ b/test/powershell/Host/TabCompletion/TabCompletion.Tests.ps1 @@ -194,7 +194,7 @@ Describe "TabCompletion" -Tags CI { } } - It 'Should complete "Export-Counter -FileFormat" with available output formats'-Skip:(!$IsWindows) { + It 'Should complete "Export-Counter -FileFormat" with available output formats' -Pending { $res = TabExpansion2 -inputScript 'Export-Counter -FileFormat ' -cursorColumn 'Export-Counter -FileFormat '.Length $res.CompletionMatches.Count | Should Be 3 $completionText = $res.CompletionMatches.CompletionText | Sort-Object diff --git a/test/powershell/engine/DefaultCommands.Tests.ps1 b/test/powershell/engine/DefaultCommands.Tests.ps1 index edb6c980b6c..42760abf08c 100644 --- a/test/powershell/engine/DefaultCommands.Tests.ps1 +++ b/test/powershell/engine/DefaultCommands.Tests.ps1 @@ -225,7 +225,7 @@ Describe "Verify approved aliases list" -Tags "CI" { "Cmdlet", "Export-Alias", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Export-Clixml", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Export-Console", , $($FullCLR ) -"Cmdlet", "Export-Counter", , $($FullCLR -or $CoreWindows ) +"Cmdlet", "Export-Counter", , $($FullCLR ) "Cmdlet", "Export-Csv", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Export-FormatData", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Export-ModuleMember", , $($FullCLR -or $CoreWindows -or $CoreUnix) @@ -248,7 +248,7 @@ Describe "Verify approved aliases list" -Tags "CI" { "Cmdlet", "Get-ComputerRestorePoint", , $($FullCLR ) "Cmdlet", "Get-Content", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Get-ControlPanelItem", , $($FullCLR ) -"Cmdlet", "Get-Counter", , $($FullCLR -or $CoreWindows ) +"Cmdlet", "Get-Counter", , $($FullCLR ) "Cmdlet", "Get-Credential", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Get-Culture", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Get-Date", , $($FullCLR -or $CoreWindows -or $CoreUnix) @@ -300,7 +300,7 @@ Describe "Verify approved aliases list" -Tags "CI" { "Cmdlet", "Group-Object", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Import-Alias", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Import-Clixml", , $($FullCLR -or $CoreWindows -or $CoreUnix) -"Cmdlet", "Import-Counter", , $($FullCLR -or $CoreWindows ) +"Cmdlet", "Import-Counter", , $($FullCLR ) "Cmdlet", "Import-Csv", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Import-LocalizedData", , $($FullCLR -or $CoreWindows -or $CoreUnix) "Cmdlet", "Import-Module", , $($FullCLR -or $CoreWindows -or $CoreUnix) diff --git a/test/powershell/engine/Help/assets/HelpURI/V2Cmdlets.csv b/test/powershell/engine/Help/assets/HelpURI/V2Cmdlets.csv index 21ad09d7193..d663fb8fcd5 100644 --- a/test/powershell/engine/Help/assets/HelpURI/V2Cmdlets.csv +++ b/test/powershell/engine/Help/assets/HelpURI/V2Cmdlets.csv @@ -42,7 +42,6 @@ Exit-PsSession,https://go.microsoft.com/fwlink/?LinkID=135212 Export-Alias,https://go.microsoft.com/fwlink/?LinkID=113296 Export-Clixml,https://go.microsoft.com/fwlink/?LinkID=113297 Export-Console,https://go.microsoft.com/fwlink/?LinkID=113298 -Export-Counter,https://go.microsoft.com/fwlink/?LinkID=138337 Export-Csv,https://go.microsoft.com/fwlink/?LinkID=113299 Export-FormatData,https://go.microsoft.com/fwlink/?LinkID=144302 Export-ModuleMember,https://go.microsoft.com/fwlink/?LinkID=141551 @@ -59,7 +58,6 @@ Get-ChildItem,https://go.microsoft.com/fwlink/?LinkID=113308 Get-Command,https://go.microsoft.com/fwlink/?LinkID=113309 Get-ComputerRestorePoint,https://go.microsoft.com/fwlink/?LinkID=135215 Get-Content,https://go.microsoft.com/fwlink/?LinkID=113310 -Get-Counter,https://go.microsoft.com/fwlink/?LinkID=138335 Get-Credential,https://go.microsoft.com/fwlink/?LinkID=113311 Get-Culture,https://go.microsoft.com/fwlink/?LinkID=113312 Get-Date,https://go.microsoft.com/fwlink/?LinkID=113313 @@ -102,7 +100,6 @@ Get-WSManInstance,https://go.microsoft.com/fwlink/?LinkID=141444 Group-Object,https://go.microsoft.com/fwlink/?LinkID=113338 Import-Alias,https://go.microsoft.com/fwlink/?LinkID=113339 Import-Clixml,https://go.microsoft.com/fwlink/?LinkID=113340 -Import-Counter,https://go.microsoft.com/fwlink/?LinkID=138338 Import-Csv,https://go.microsoft.com/fwlink/?LinkID=113341 Import-LocalizedData,https://go.microsoft.com/fwlink/?LinkID=113342 Import-Module,https://go.microsoft.com/fwlink/?LinkID=141553 From 65bd206c1013fb1b33028f88990bd0356caac874 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Wed, 19 Jul 2017 13:19:46 -0700 Subject: [PATCH 4/4] remove counter exports [Feature] --- .../Microsoft.PowerShell.Diagnostics.psd1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Modules/Windows-Core/Microsoft.PowerShell.Diagnostics/Microsoft.PowerShell.Diagnostics.psd1 b/src/Modules/Windows-Core/Microsoft.PowerShell.Diagnostics/Microsoft.PowerShell.Diagnostics.psd1 index a394a1931cb..daaea553726 100644 --- a/src/Modules/Windows-Core/Microsoft.PowerShell.Diagnostics/Microsoft.PowerShell.Diagnostics.psd1 +++ b/src/Modules/Windows-Core/Microsoft.PowerShell.Diagnostics/Microsoft.PowerShell.Diagnostics.psd1 @@ -2,10 +2,10 @@ GUID="CA046F10-CA64-4740-8FF9-2565DBA61A4F" Author="Microsoft Corporation" CompanyName="Microsoft Corporation" -Copyright="© Microsoft Corporation. All rights reserved." +Copyright="© Microsoft Corporation. All rights reserved." ModuleVersion="3.0.0.0" PowerShellVersion="3.0" -CmdletsToExport="Get-WinEvent", "New-WinEvent", "Get-Counter", "Import-Counter", "Export-Counter" +CmdletsToExport="Get-WinEvent", "New-WinEvent" # Counter CmdLets Disabled #4272: "Get-Counter", "Import-Counter", "Export-Counter" NestedModules="Microsoft.PowerShell.Commands.Diagnostics.dll" TypesToProcess="GetEvent.types.ps1xml" FormatsToProcess="Event.format.ps1xml", "Diagnostics.format.ps1xml"