mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Only run tests on Windows, otherwise skip them. (#4861)
This commit is contained in:
committed by
Travis Plunk
parent
de70969f4e
commit
fb7c7b038b
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user