From 7cd6a76479baeb8b4c62e78a69bc84906ec3080d Mon Sep 17 00:00:00 2001 From: Sergei Vorobev Date: Thu, 16 Jun 2016 19:19:25 -0700 Subject: [PATCH] Add project.json for ScheduledJob, add test that we build PSScheduledJob module --- .../project.json | 25 +++++++++++++++++++ test/fullclr/PowerShellGithubDev.Tests.ps1 | 16 ++++++++++-- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 src/Microsoft.PowerShell.ScheduledJob/project.json diff --git a/src/Microsoft.PowerShell.ScheduledJob/project.json b/src/Microsoft.PowerShell.ScheduledJob/project.json new file mode 100644 index 0000000000..e751089853 --- /dev/null +++ b/src/Microsoft.PowerShell.ScheduledJob/project.json @@ -0,0 +1,25 @@ +{ + "name": "Microsoft.PowerShell.ScheduledJob", + "version": "1.0.0-*", + + "buildOptions": { + "keyFile": "../signing/visualstudiopublic.snk", + "delaySign": true, + "publicSign": false, + "warningsAsErrors": true, + }, + + "dependencies": { + "System.Management.Automation": "1.0.0-*", + "Microsoft.PowerShell.ScheduledJob.Interop": "1.0.0-*" + }, + + "frameworks": { + "net451": { + "frameworkAssemblies": { + "System.Threading": "", + "System.Threading.Tasks": "" + } + } + } +} diff --git a/test/fullclr/PowerShellGithubDev.Tests.ps1 b/test/fullclr/PowerShellGithubDev.Tests.ps1 index 7ee7ebd6ab..69cb5ef820 100644 --- a/test/fullclr/PowerShellGithubDev.Tests.ps1 +++ b/test/fullclr/PowerShellGithubDev.Tests.ps1 @@ -43,7 +43,7 @@ Describe 'Modules for the packge' { It 'loads Microsoft.PowerShell.LocalAccounts' { try { - Import-Module Microsoft.PowerShell.LocalAccounts + Import-Module Microsoft.PowerShell.LocalAccounts -ErrorAction Stop Get-LocalUser | Should Not Be $null } finally @@ -55,7 +55,7 @@ Describe 'Modules for the packge' { It 'loads Microsoft.PowerShell.Archive' { try { - Import-Module Microsoft.PowerShell.LocalAccounts + Import-Module Microsoft.PowerShell.LocalAccounts -ErrorAction Stop Set-Content -Path TestDrive:\1.txt -Value '' Compress-Archive -Path TestDrive:\1.txt -DestinationPath TestDrive:\1.zip Get-ChildItem -Path TestDrive:\1.zip | Should Not Be $null @@ -65,6 +65,18 @@ Describe 'Modules for the packge' { Remove-Module -ErrorAction SilentlyContinue Microsoft.PowerShell.Archive } } + + It 'loads PsScheduledJob' { + try + { + Import-Module PsScheduledJob -ErrorAction Stop + New-ScheduledJobOption | Should Not Be $null + } + finally + { + Remove-Module -ErrorAction SilentlyContinue PsScheduledJob + } + } } finally {