diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/TimeZoneCommands.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/TimeZoneCommands.cs index abac5b70a..a1f5f2082 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/TimeZoneCommands.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/TimeZoneCommands.cs @@ -1,3 +1,5 @@ +#if !LINUX + using System; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -860,3 +862,5 @@ namespace Microsoft.PowerShell.Commands } } } + +#endif diff --git a/src/Microsoft.PowerShell.Security/project.json b/src/Microsoft.PowerShell.Security/project.json index 3f8f191de..f1795bc00 100644 --- a/src/Microsoft.PowerShell.Security/project.json +++ b/src/Microsoft.PowerShell.Security/project.json @@ -10,6 +10,14 @@ "allowUnsafe": true }, + "configurations": { + "Linux": { + "buildOptions": { + "define": [ "LINUX" ] + } + } + }, + "dependencies": { "System.Management.Automation": "1.0.0-*" }, diff --git a/src/Microsoft.PowerShell.Security/security/CatalogCommands.cs b/src/Microsoft.PowerShell.Security/security/CatalogCommands.cs index 4ccdd4386..76656c6f4 100644 --- a/src/Microsoft.PowerShell.Security/security/CatalogCommands.cs +++ b/src/Microsoft.PowerShell.Security/security/CatalogCommands.cs @@ -1,3 +1,5 @@ +#if !LINUX + /********************************************************************++ Copyright (c) Microsoft Corporation. All rights reserved. --********************************************************************/ @@ -279,4 +281,6 @@ namespace Microsoft.PowerShell.Commands } } -} \ No newline at end of file +} + +#endif diff --git a/src/System.Management.Automation/security/CatalogHelper.cs b/src/System.Management.Automation/security/CatalogHelper.cs index f052cbe48..d3b65f556 100644 --- a/src/System.Management.Automation/security/CatalogHelper.cs +++ b/src/System.Management.Automation/security/CatalogHelper.cs @@ -1,3 +1,4 @@ +#if !LINUX /********************************************************************++ Copyright (c) Microsoft Corporation. All rights reserved. @@ -844,3 +845,4 @@ namespace System.Management.Automation } } +#endif diff --git a/test/powershell/Modules/Microsoft.PowerShell.Management/Get-TimeZone.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Management/Get-TimeZone.Tests.ps1 index b369a9d7c..6f3f307df 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Management/Get-TimeZone.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Management/Get-TimeZone.Tests.ps1 @@ -14,6 +14,8 @@ [snippet] Both StandardName and DaylightName are localized according to the current user default UI language. #> +if ($IsWindows) { + function Assert-ListsSame { param([object[]] $expected, [object[]] $observed ) @@ -116,3 +118,4 @@ Describe "Get-Timezone test cases" -tags 'Innerloop','RI' { } } +} diff --git a/test/powershell/Modules/Microsoft.PowerShell.Management/Set-TimeZone.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Management/Set-TimeZone.Tests.ps1 index ed76e0b1a..1b977ba1e 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Management/Set-TimeZone.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Management/Set-TimeZone.Tests.ps1 @@ -14,6 +14,8 @@ [snippet] Both StandardName and DaylightName are localized according to the current user default UI language. #> +if ($IsWindows) { + function Assert-ListsSame { param([object[]] $expected, [object[]] $observed ) @@ -131,3 +133,5 @@ Describe "Set-Timezone test cases" -tags 'Innerloop','RI' { $observed.Id -eq $origTimeZoneID | Should Be $true } } + +} diff --git a/test/powershell/Modules/Microsoft.PowerShell.Security/FileCatalog.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Security/FileCatalog.Tests.ps1 index 99a36df0f..19951a7fd 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Security/FileCatalog.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Security/FileCatalog.Tests.ps1 @@ -3,6 +3,8 @@ # Copyright (c) Microsoft Corporation, 2016 # +if ($IsWindows) { + $script:catalogPath = "" Describe "Test suite for NewFileCatalogAndTestFileCatalogCmdlets" -Tags "Innerloop","BVT" { @@ -375,3 +377,5 @@ Describe "Test suite for NewFileCatalogAndTestFileCatalogCmdlets" -Tags "Innerlo } } } + +}