Only run tests on Windows, otherwise skip them. (#4861)

This commit is contained in:
James Truher [MSFT]
2017-09-19 13:51:21 -07:00
committed by Travis Plunk
parent de70969f4e
commit fb7c7b038b
2 changed files with 9 additions and 14 deletions
@@ -6,7 +6,10 @@ $assemblyName = "Microsoft.Management.Infrastructure.CimCmdlets"
# entries in the csproj for the assembly
$excludeList = @()
# load the module since it isn't there by default
import-module CimCmdlets
if ( $IsWindows )
{
import-module CimCmdlets
}
# run the tests
Test-ResourceStrings -AssemblyName $AssemblyName -ExcludeList $excludeList
@@ -6,17 +6,9 @@ $assemblyName = "Microsoft.WSMan.Management"
# entries in the csproj for the assembly
$excludeList = @()
# load the module since it isn't there by default
import-module Microsoft.WSMan.Management
try {
if ( ! $IsWindows )
{
$PSDefaultParameterValues["it:skip"] = $true
}
# run the tests
Test-ResourceStrings -AssemblyName $AssemblyName -ExcludeList $excludeList
}
finally {
$PSDefaultParameterValues.Remove("it:skip")
if ( $IsWindows ) {
import-module Microsoft.WSMan.Management
}
# run the tests
Test-ResourceStrings -AssemblyName $AssemblyName -ExcludeList $excludeList