diff --git a/src/ResGen/project.json b/src/ResGen/project.json index fc3ebf6a8..40cd1ab2e 100644 --- a/src/ResGen/project.json +++ b/src/ResGen/project.json @@ -17,7 +17,7 @@ }, "runtimes": { - "ubuntu.16.04-x64": { }, + "ubuntu.16.04-x64": { }, "ubuntu.14.04-x64": { }, "debian.8-x64": { }, "centos.7-x64": { }, diff --git a/test/powershell/engine/HelpContent/Microsoft.PowerShell.Core_00000000-0000-0000-0000-000000000000_HelpInfo.xml b/test/powershell/engine/HelpContent/Microsoft.PowerShell.Core_00000000-0000-0000-0000-000000000000_HelpInfo.xml new file mode 100644 index 000000000..1b94d3e8a --- /dev/null +++ b/test/powershell/engine/HelpContent/Microsoft.PowerShell.Core_00000000-0000-0000-0000-000000000000_HelpInfo.xml @@ -0,0 +1,10 @@ + + + http://go.microsoft.com/fwlink/?linkid=390782 + + + en-US + 5.0.7.0 + + + \ No newline at end of file diff --git a/test/powershell/engine/HelpContent/Microsoft.PowerShell.Core_00000000-0000-0000-0000-000000000000_en-US_HelpContent.cab b/test/powershell/engine/HelpContent/Microsoft.PowerShell.Core_00000000-0000-0000-0000-000000000000_en-US_HelpContent.cab new file mode 100644 index 000000000..2509a6b4a Binary files /dev/null and b/test/powershell/engine/HelpContent/Microsoft.PowerShell.Core_00000000-0000-0000-0000-000000000000_en-US_HelpContent.cab differ diff --git a/test/powershell/engine/HelpSystem.Tests.ps1 b/test/powershell/engine/HelpSystem.Tests.ps1 index d0fd70f75..e72782485 100644 --- a/test/powershell/engine/HelpSystem.Tests.ps1 +++ b/test/powershell/engine/HelpSystem.Tests.ps1 @@ -5,7 +5,29 @@ function RunTestCase { param ([string]$tag = "CI") - $cmdlets = get-command -module "Microsoft.PowerShell.Core" + $moduleName = "Microsoft.PowerShell.Core" + + if ($IsWindows) + { + if ($tag -eq "CI") + { + $helpContentPath = join-path $PSScriptRoot "HelpContent" + $helpFiles = @(Get-ChildItem "$helpContentPath\*" -ea SilentlyContinue) + + if ($helpFiles.Count -eq 0) + { + throw "unable to find help content at '$helpContentPath'" + } + Update-Help -Module $moduleName -SourcePath $helpContentPath -Force -ErrorAction Stop -Verbose + } + + else + { + Update-Help -Module $moduleName -Force -Verbose -ErrorAction Stop + } + } + + $cmdlets = get-command -module $moduleName $cmdletsToSkip = @( "Get-PSHostProcessInfo", @@ -13,8 +35,6 @@ function RunTestCase "Register-ArgumentCompleter" ) - $testCaseExecuted = $false - foreach ($cmdletName in $cmdlets) { if ($cmdletsToSkip -notcontains $cmdletName) @@ -24,10 +44,9 @@ function RunTestCase $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) + if ($tag -eq "CI") { # For a CI test run, we are only interested in validating one cmdlet to ensure that # get-help works.