diff --git a/src/ResGen/project.json b/src/ResGen/project.json index 0dea62d8e4..fc3ebf6a80 100644 --- a/src/ResGen/project.json +++ b/src/ResGen/project.json @@ -17,6 +17,7 @@ }, "runtimes": { + "ubuntu.16.04-x64": { }, "ubuntu.14.04-x64": { }, "debian.8-x64": { }, "centos.7-x64": { }, diff --git a/test/powershell/engine/HelpSystem.Tests.ps1 b/test/powershell/engine/HelpSystem.Tests.ps1 index 594d2f8c8f..28446399fc 100644 --- a/test/powershell/engine/HelpSystem.Tests.ps1 +++ b/test/powershell/engine/HelpSystem.Tests.ps1 @@ -1,25 +1,49 @@ -Describe 'Basic help system tests' -Tags "CI" { +# +# Validates Get-Help for cmdlets in Microsoft.PowerShell.Core. - Context "Validate help content for cmdlets in Microsof.PowerShell.Core" { +function RunTestCase +{ + param ([string]$tag = "CI") - $cmdlets = get-command -module "Microsoft.PowerShell.Core" - $cmdletsToSkip = @( - "Get-PSHostProcessInfo", - "Out-Default", - "Register-ArgumentCompleter" - ) + $cmdlets = get-command -module "Microsoft.PowerShell.Core" - foreach ($cmdletName in $cmdlets) + $cmdletsToSkip = @( + "Get-PSHostProcessInfo", + "Out-Default", + "Register-ArgumentCompleter" + ) + + $testCaseExecuted = $false + + foreach ($cmdletName in $cmdlets) + { + if ($cmdletsToSkip -notcontains $cmdletName) { - if ($cmdletsToSkip -notcontains $cmdletName) - { - It "Validate -Description and -Examples sections in help content. Run 'Get-help -name $cmdletName'" { + It "Validate -Description and -Examples sections in help content. Run 'Get-help -name $cmdletName'" { - $help = get-help -name $cmdletName - $help.Description | Out-String | Should Match $cmdletName - $help.Examples | Out-String | Should Match $cmdletName - } + $help = get-help -name $cmdletName + $help.Description | Out-String | Should Match $cmdletName + $help.Examples | Out-String | Should Match $cmdletName + $testCaseExecuted = $true + } + + if (($tag -eq "CI") -and $testCaseExecuted) + { + # For a CI test run, we are only interested in validating one cmdlet to ensure that + # get-help works. + break } } } } + +Describe "Validate that get-help works" -Tags "CI" { + + RunTestCase -tag "CI" +} + +Describe "Validate Get-Help for all cmdlets in 'Microsoft.PowerShell.Core'" -Tags "Feature" { + + RunTestCase + +}