From e00161a8aff7241a0e13aeffd679fac3ec6495fd Mon Sep 17 00:00:00 2001 From: Ilya Date: Wed, 17 May 2017 22:09:27 +0400 Subject: [PATCH] Add autoload for TestLanguage.psm1 TestHelpers.psm1 (#3456) * Add autoload for TestHelpers.psm1 Test.Helpers.psm1 was renamed to TestHelpers.psm1 * Resolve conflit and rebase Add autoload for TestLanguage.psm1 * Remove unneeded comments from PSD1 files * Rename test modules Remove approved verbs (Get-Verb) from module names. * Enhance ShouldBeErrorId to output exception into pipeline for later analysis * Remove unneeded comments * Resolve merge conflict --- .../Scripting.Classes.BasicParsing.Tests.ps1 | 1 - .../scripting.Classes.NestedModules.tests.ps1 | 2 - .../scripting.Classes.inheritance.tests.ps1 | 2 - .../Classes/scripting.Classes.using.tests.ps1 | 2 - .../Classes/scripting.enums.tests.ps1 | 2 - .../Language/Parser/Parsing.Tests.ps1 | 3 +- .../Language/Parser/UsingNamespace.Tests.ps1 | 3 - .../Scripting/Debugging/Debugging.Tests.ps1 | 4 - .../NativeCommandProcessor.Tests.ps1 | 4 - .../Microsoft.PowerShell.Core/Job.Tests.ps1 | 1 - .../FileSystem.Tests.ps1 | 1 - .../Start-Process.Tests.ps1 | 2 - .../Set-Date.Tests.ps1 | 1 - .../engine/Module/NewModuleManifest.Tests.ps1 | 2 - .../Module/TestModuleManifest.Tests.ps1 | 2 - .../Modules/HelpersCommon/HelpersCommon.psd1 | 21 + .../Modules/HelpersCommon/HelpersCommon.psm1} | 10 +- .../Modules/HelpersHostCS/HelpersHostCS.psd1 | 21 + .../HelpersHostCS.psm1} | 631 +++++++++--------- .../HelpersLanguage/HelpersLanguage.psd1 | 22 + .../HelpersLanguage/HelpersLanguage.psm1} | 386 +++++------ .../HelpersRemoting/HelpersRemoting.psd1 | 21 + .../HelpersRemoting.psm1} | 0 test/tools/Modules/TestHostCS/TestHostCS.psd1 | 38 -- .../Modules/TestRemoting/TestRemoting.psd1 | 37 - 25 files changed, 599 insertions(+), 620 deletions(-) create mode 100644 test/tools/Modules/HelpersCommon/HelpersCommon.psd1 rename test/{powershell/Common/Test.Helpers.psm1 => tools/Modules/HelpersCommon/HelpersCommon.psm1} (88%) create mode 100644 test/tools/Modules/HelpersHostCS/HelpersHostCS.psd1 rename test/tools/Modules/{TestHostCS/TestHostCS.psm1 => HelpersHostCS/HelpersHostCS.psm1} (97%) create mode 100644 test/tools/Modules/HelpersLanguage/HelpersLanguage.psd1 rename test/{powershell/Language/LanguageTestSupport.psm1 => tools/Modules/HelpersLanguage/HelpersLanguage.psm1} (96%) create mode 100644 test/tools/Modules/HelpersRemoting/HelpersRemoting.psd1 rename test/tools/Modules/{TestRemoting/TestRemoting.psm1 => HelpersRemoting/HelpersRemoting.psm1} (100%) delete mode 100644 test/tools/Modules/TestHostCS/TestHostCS.psd1 delete mode 100644 test/tools/Modules/TestRemoting/TestRemoting.psd1 diff --git a/test/powershell/Language/Classes/Scripting.Classes.BasicParsing.Tests.ps1 b/test/powershell/Language/Classes/Scripting.Classes.BasicParsing.Tests.ps1 index dd9ead0ddb..8d5f7c7776 100644 --- a/test/powershell/Language/Classes/Scripting.Classes.BasicParsing.Tests.ps1 +++ b/test/powershell/Language/Classes/Scripting.Classes.BasicParsing.Tests.ps1 @@ -1,7 +1,6 @@ # # Copyright (c) Microsoft Corporation, 2014 # -Import-Module $PSScriptRoot\..\LanguageTestSupport.psm1 try { # diff --git a/test/powershell/Language/Classes/scripting.Classes.NestedModules.tests.ps1 b/test/powershell/Language/Classes/scripting.Classes.NestedModules.tests.ps1 index 12f07535e8..4759baf7e3 100644 --- a/test/powershell/Language/Classes/scripting.Classes.NestedModules.tests.ps1 +++ b/test/powershell/Language/Classes/scripting.Classes.NestedModules.tests.ps1 @@ -1,7 +1,5 @@ Describe 'NestedModules' -Tags "CI" { - Import-Module $PSScriptRoot\..\LanguageTestSupport.psm1 - function New-TestModule { param( [string]$Name, diff --git a/test/powershell/Language/Classes/scripting.Classes.inheritance.tests.ps1 b/test/powershell/Language/Classes/scripting.Classes.inheritance.tests.ps1 index d782ed3b27..b505849c21 100644 --- a/test/powershell/Language/Classes/scripting.Classes.inheritance.tests.ps1 +++ b/test/powershell/Language/Classes/scripting.Classes.inheritance.tests.ps1 @@ -2,8 +2,6 @@ # Copyright (c) Microsoft Corporation, 2015 # -Import-Module $PSScriptRoot\..\LanguageTestSupport.psm1 - Describe 'Classes inheritance syntax' -Tags "CI" { It 'Base types' { diff --git a/test/powershell/Language/Classes/scripting.Classes.using.tests.ps1 b/test/powershell/Language/Classes/scripting.Classes.using.tests.ps1 index 27bbbfac13..6c459add17 100644 --- a/test/powershell/Language/Classes/scripting.Classes.using.tests.ps1 +++ b/test/powershell/Language/Classes/scripting.Classes.using.tests.ps1 @@ -2,8 +2,6 @@ Describe 'using module' -Tags "CI" { BeforeAll { $originalPSModulePath = $env:PSModulePath - Import-Module $PSScriptRoot\..\LanguageTestSupport.psm1 - function New-TestModule { param( [string]$Name, diff --git a/test/powershell/Language/Classes/scripting.enums.tests.ps1 b/test/powershell/Language/Classes/scripting.enums.tests.ps1 index 5f5b37d7a9..7d79bc5f14 100644 --- a/test/powershell/Language/Classes/scripting.enums.tests.ps1 +++ b/test/powershell/Language/Classes/scripting.enums.tests.ps1 @@ -75,8 +75,6 @@ Describe 'enums' -Tags "CI" { Describe 'Basic enum errors' -Tags "CI" { - Import-Module $PSScriptRoot\..\LanguageTestSupport.psm1 - AfterAll { Remove-Module LanguageTestSupport } diff --git a/test/powershell/Language/Parser/Parsing.Tests.ps1 b/test/powershell/Language/Parser/Parsing.Tests.ps1 index cd3f389e79..5c9370b486 100644 --- a/test/powershell/Language/Parser/Parsing.Tests.ps1 +++ b/test/powershell/Language/Parser/Parsing.Tests.ps1 @@ -1,5 +1,4 @@ -Import-Module $PSScriptRoot\..\LanguageTestSupport.psm1 -set-strictmode -v 2 +set-strictmode -v 2 Describe 'for statement parsing' -Tags "CI" { ShouldBeParseError 'for' MissingOpenParenthesisAfterKeyword 4 -CheckColumnNumber diff --git a/test/powershell/Language/Parser/UsingNamespace.Tests.ps1 b/test/powershell/Language/Parser/UsingNamespace.Tests.ps1 index 555894cd71..0e743b7543 100644 --- a/test/powershell/Language/Parser/UsingNamespace.Tests.ps1 +++ b/test/powershell/Language/Parser/UsingNamespace.Tests.ps1 @@ -9,9 +9,6 @@ using namespace System.Diagnostics using namespace System.Diagnostics; using namespace System.Runtime.CompilerServices using namespace System.Collections.Generic -Import-Module $PSScriptRoot\..\LanguageTestSupport.psm1 -Import-Module $PSScriptRoot\..\..\Common\Test.Helpers.psm1 - # Flags is System.FlagsAttribute # This tests our implicit 'using namespace System' # despite having other explicit using namespace statements. diff --git a/test/powershell/Language/Scripting/Debugging/Debugging.Tests.ps1 b/test/powershell/Language/Scripting/Debugging/Debugging.Tests.ps1 index 95f475bc19..8e6abbcd00 100644 --- a/test/powershell/Language/Scripting/Debugging/Debugging.Tests.ps1 +++ b/test/powershell/Language/Scripting/Debugging/Debugging.Tests.ps1 @@ -12,10 +12,6 @@ $script2 = @' "line 3" '@ -$testroot = resolve-path (join-path $psscriptroot ../../..) -$common = join-path $testroot Common -$helperModule = join-path $common Test.Helpers.psm1 - Describe "Breakpoints when set should be hit" -tag "CI" { BeforeAll { $path = setup -pass -f TestScript_1.ps1 -content $script1 diff --git a/test/powershell/Language/Scripting/NativeExecution/NativeCommandProcessor.Tests.ps1 b/test/powershell/Language/Scripting/NativeExecution/NativeCommandProcessor.Tests.ps1 index f222cf694a..d82ed5b303 100644 --- a/test/powershell/Language/Scripting/NativeExecution/NativeCommandProcessor.Tests.ps1 +++ b/test/powershell/Language/Scripting/NativeExecution/NativeCommandProcessor.Tests.ps1 @@ -1,7 +1,3 @@ -$testroot = resolve-path (join-path $psscriptroot ../../..) -$common = join-path $testroot Common -$helperModule = join-path $common Test.Helpers.psm1 - Describe 'native commands lifecycle' -tags 'Feature' { BeforeAll { diff --git a/test/powershell/Modules/Microsoft.PowerShell.Core/Job.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Core/Job.Tests.ps1 index 5c33da9f6a..2cf7343776 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Core/Job.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Core/Job.Tests.ps1 @@ -1,4 +1,3 @@ -Import-Module $PSScriptRoot\..\..\Common\Test.Helpers.psm1 Describe "Job Cmdlet Tests" -Tag "CI" { Context "Simple Jobs" { BeforeEach { diff --git a/test/powershell/Modules/Microsoft.PowerShell.Management/FileSystem.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Management/FileSystem.Tests.ps1 index bd2d727e67..b513a206ac 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Management/FileSystem.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Management/FileSystem.Tests.ps1 @@ -1,4 +1,3 @@ -Import-Module $PSScriptRoot\..\..\Common\Test.Helpers.psm1 Describe "Basic FileSystem Provider Tests" -Tags "CI" { BeforeAll { $testDir = "TestDir" diff --git a/test/powershell/Modules/Microsoft.PowerShell.Management/Start-Process.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Management/Start-Process.Tests.ps1 index 7ed13ff0e5..379da4878f 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Management/Start-Process.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Management/Start-Process.Tests.ps1 @@ -1,5 +1,3 @@ -Import-Module $PSScriptRoot\..\..\Common\Test.Helpers.psm1 - Describe "Start-Process" -Tags @("CI","SLOW") { BeforeAll { diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/Set-Date.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Utility/Set-Date.Tests.ps1 index ce723a1ba6..c313ac4965 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Utility/Set-Date.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Utility/Set-Date.Tests.ps1 @@ -3,7 +3,6 @@ # determine whether we're elevated Describe "Set-Date" -Tag "CI" { BeforeAll { - Import-Module (join-path $psscriptroot "../../Common/Test.Helpers.psm1") $IsElevated = Test-IsElevated } diff --git a/test/powershell/engine/Module/NewModuleManifest.Tests.ps1 b/test/powershell/engine/Module/NewModuleManifest.Tests.ps1 index dcd750ebc3..16df27a3f1 100644 --- a/test/powershell/engine/Module/NewModuleManifest.Tests.ps1 +++ b/test/powershell/engine/Module/NewModuleManifest.Tests.ps1 @@ -1,5 +1,3 @@ -Import-Module $PSScriptRoot\..\..\Common\Test.Helpers.psm1 - Describe "New-ModuleManifest tests" -tags "CI" { BeforeEach { New-Item -ItemType Directory -Path testdrive:/module diff --git a/test/powershell/engine/Module/TestModuleManifest.Tests.ps1 b/test/powershell/engine/Module/TestModuleManifest.Tests.ps1 index 0b2325e7ff..4228a985c1 100644 --- a/test/powershell/engine/Module/TestModuleManifest.Tests.ps1 +++ b/test/powershell/engine/Module/TestModuleManifest.Tests.ps1 @@ -1,5 +1,3 @@ -Import-Module $PSScriptRoot\..\..\Common\Test.Helpers.psm1 - Describe "Test-ModuleManifest tests" -tags "CI" { AfterEach { diff --git a/test/tools/Modules/HelpersCommon/HelpersCommon.psd1 b/test/tools/Modules/HelpersCommon/HelpersCommon.psd1 new file mode 100644 index 0000000000..5367155d09 --- /dev/null +++ b/test/tools/Modules/HelpersCommon/HelpersCommon.psd1 @@ -0,0 +1,21 @@ +# +# Module manifest for module 'HelpersCommon' +# + +@{ + +RootModule = 'HelpersCommon.psm1' + +ModuleVersion = '1.0' + +GUID = 'cc1c8e94-51d1-4bc1-b508-62bc09f02f54' + +CompanyName = 'Microsoft Corporation' + +Copyright = 'Copyright (C) Microsoft Corporation, All rights reserved.' + +Description = 'Temporary module contains functions for using in tests' + +FunctionsToExport = 'Wait-UntilTrue', 'Test-IsElevated', 'ShouldBeErrorId' + +} diff --git a/test/powershell/Common/Test.Helpers.psm1 b/test/tools/Modules/HelpersCommon/HelpersCommon.psm1 similarity index 88% rename from test/powershell/Common/Test.Helpers.psm1 rename to test/tools/Modules/HelpersCommon/HelpersCommon.psm1 index 79d3c67395..e3376c1231 100644 --- a/test/powershell/Common/Test.Helpers.psm1 +++ b/test/tools/Modules/HelpersCommon/HelpersCommon.psm1 @@ -57,14 +57,14 @@ function ShouldBeErrorId try { - & $sb - Throw "Exception expected, execution should not have reached here" + & $sb | Out-Null + Throw "No Exception!" } catch { - $_.FullyQualifiedErrorId | Should Be $FullyQualifiedErrorId + $_.FullyQualifiedErrorId | Should Be $FullyQualifiedErrorId | Out-Null + # Write the exception to output that allow us to check later other properies of the exception + Write-Output $_ } } -export-modulemember -function Wait-UntilTrue,Test-IsElevated, ShouldBeErrorId - diff --git a/test/tools/Modules/HelpersHostCS/HelpersHostCS.psd1 b/test/tools/Modules/HelpersHostCS/HelpersHostCS.psd1 new file mode 100644 index 0000000000..5900c5c5fa --- /dev/null +++ b/test/tools/Modules/HelpersHostCS/HelpersHostCS.psd1 @@ -0,0 +1,21 @@ +# +# Module manifest for module 'HelpersHostCS' +# + +@{ + +RootModule = 'HelpersHostCS.psm1' + +ModuleVersion = '1.0' + +GUID = '40a19c05-d765-41a1-995e-98ca5f247ee1' + +CompanyName = 'Microsoft Corporation' + +Copyright = 'Copyright (C) Microsoft Corporation, All rights reserved.' + +Description = 'Simple console host for console IO tests.' + +FunctionsToExport = 'New-TestHost' + +} diff --git a/test/tools/Modules/TestHostCS/TestHostCS.psm1 b/test/tools/Modules/HelpersHostCS/HelpersHostCS.psm1 similarity index 97% rename from test/tools/Modules/TestHostCS/TestHostCS.psm1 rename to test/tools/Modules/HelpersHostCS/HelpersHostCS.psm1 index 4e97aaa4e3..a275fec845 100755 --- a/test/tools/Modules/TestHostCS/TestHostCS.psm1 +++ b/test/tools/Modules/HelpersHostCS/HelpersHostCS.psm1 @@ -1,316 +1,315 @@ -$definition = @' -using System; -using System.Collections.Generic; -using System.Threading; -using System.Management.Automation; -using System.Management.Automation.Host; -using System.Globalization; -using System.Collections.ObjectModel; -using System.Security; -using System.Collections; - -namespace TestHost -{ - public class TestHostRawUI : PSHostRawUserInterface - { - private ConsoleColor _backgroundColor = ConsoleColor.Black; - public override ConsoleColor BackgroundColor - { - get { return _backgroundColor; } - set { _backgroundColor = value; } - } - private ConsoleColor _foregroundColor = ConsoleColor.White; - public override ConsoleColor ForegroundColor - { - get { return _foregroundColor; } - set { _foregroundColor = value; } - } - private string _windowTitle = "title"; - public override string WindowTitle - { - get { return _windowTitle; } - set { _windowTitle = value; } - } - private Size _bufferSize = new Size(10,10); - public override Size BufferSize - { - get { return _bufferSize; } - set { _bufferSize = value; } - } - private Coordinates _cursorPosition = new Coordinates(0, 0); - public override Coordinates CursorPosition - { - get { return _cursorPosition; } - set { _cursorPosition = value; } - } - private int _cursorSize = 10; - public override int CursorSize - { - get { return _cursorSize; } - set { _cursorSize = value; } - } - private bool _keyAvailable = false; - public override bool KeyAvailable - { - get { return _keyAvailable; } - } - public override Size MaxPhysicalWindowSize - { - get { throw new NotImplementedException(); } - } - public override Size MaxWindowSize - { - get { throw new NotImplementedException(); } - } - private Coordinates _windowPosition = new Coordinates(0, 0); - public override Coordinates WindowPosition - { - get { return _windowPosition; } - - set { _windowPosition = value; } - } - private Size _windowSize = new Size(80, 40); - public override Size WindowSize - { - get { return _windowSize; } - set { _windowSize = value; } - } - public override BufferCell[,] GetBufferContents(Rectangle rectangle) { throw new NotImplementedException(); } - public override void FlushInputBuffer() { throw new NotImplementedException(); } - public override KeyInfo ReadKey(ReadKeyOptions options) { throw new NotImplementedException(); } - public override void SetBufferContents(Coordinates origin, BufferCell[,] contents) { throw new NotImplementedException(); } - public override void SetBufferContents(Rectangle rectangle, BufferCell fill) { throw new NotImplementedException(); } - public override void ScrollBufferContents(Rectangle source, Coordinates destination, Rectangle clip, BufferCell fill) { throw new NotImplementedException(); } - } - - public class Streams - { - public ArrayList ConsoleOutput = new ArrayList(); - public ArrayList Input = new ArrayList(); - public ArrayList Error = new ArrayList(); - public ArrayList Verbose = new ArrayList(); - public ArrayList Debug = new ArrayList(); - public ArrayList Warning = new ArrayList(); - public ArrayList Information = new ArrayList(); - public ArrayList Progress = new ArrayList(); - public ArrayList Prompt = new ArrayList(); - public void Clear() { - ConsoleOutput.Clear(); - Input.Clear(); - Error.Clear(); - Verbose.Clear(); - Debug.Clear(); - Warning.Clear(); - Information.Clear(); - Progress.Clear(); - Prompt.Clear(); - } - } - public class TestPSHostUserInterface : PSHostUserInterface - { - private PSHostRawUserInterface _rawui = new TestHostRawUI(); - public string ReadLineData = "This is readline data"; - public int PromptedChoice = 0; - public string StringForSecureString = "TEST"; - public string UserNameForCredential = "Admin"; - public object promptResponse = "this is a prompt response"; - - public Streams Streams = new Streams(); - public override PSHostRawUserInterface RawUI - { - get { return _rawui; } - } - - public override Dictionary Prompt(string caption, string message, Collection descriptions) - { - if (descriptions == null || descriptions[0] == null) - { - throw new ArgumentException("descriptions"); - } - - string s = descriptions[0].Name; - Streams.Prompt.Add(caption + ":" + message + ":" + s); - Dictionary d = new Dictionary(); - d.Add(s, new PSObject(promptResponse)); - return d; - } - - public override int PromptForChoice(string caption, string message, Collection choices, int defaultChoice) - { - Streams.Prompt.Add(caption + ":" + message); - return PromptedChoice; - } - - public override PSCredential PromptForCredential(string caption, string message, string userName, string targetName) - { - Streams.Prompt.Add("Credential:" + caption + ":" + message); - SecureString ss = ReadLineAsSecureString(); - string userNameToUse = string.IsNullOrEmpty(userName) ? UserNameForCredential : userName; - return new PSCredential(userNameToUse, ss); - } - - public override PSCredential PromptForCredential(string caption, string message, string userName, string targetName, PSCredentialTypes allowedCredentialTypes, PSCredentialUIOptions options) - { - Streams.Prompt.Add("Credential:" + caption + ":" + message); - SecureString ss = ReadLineAsSecureString(); - string userNameToUse = string.IsNullOrEmpty(userName) ? UserNameForCredential : userName; - return new PSCredential(userNameToUse, ss); - } - - public override string ReadLine() - { - return ReadLineData; - } - - public override SecureString ReadLineAsSecureString() - { - SecureString ss = new SecureString(); - foreach(char c in StringForSecureString.ToCharArray()) { ss.AppendChar(c); } - return ss; - } - - // Cmdlets call 'Write' and 'WriteLine' methods implicitly. - // To see difference between 'Write' and 'WriteLine' with and w/o colors in the debug output - // we need use a meta information. - // So we make a output string as: - // : : <'user value'> : <'NewLine' or 'NoNewLine'> - // - public override void Write(string value) - { - Streams.ConsoleOutput.Add("::"+value+":NoNewLine"); - } - - public override void Write(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string value) - { - Streams.ConsoleOutput.Add(foregroundColor+":"+backgroundColor+":"+value+":NoNewLine"); - } - - public override void WriteLine(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string value) - { - Streams.ConsoleOutput.Add(foregroundColor+":"+backgroundColor+":"+value+":NewLine"); - } - - public override void WriteDebugLine(string message) - { - Streams.Debug.Add(message); - } - - public override void WriteErrorLine(string value) - { - Streams.Error.Add(value); - } - - public override void WriteLine(string value) - { - Streams.ConsoleOutput.Add("::"+value+":NewLine"); - } - - public override void WriteProgress(long sourceId, ProgressRecord record) - { - Streams.Progress.Add(record); - } - - public override void WriteVerboseLine(string message) - { - Streams.Verbose.Add(message); - } - - public override void WriteWarningLine(string message) - { - Streams.Warning.Add(message); - } - - public override void WriteInformation(InformationRecord record) - { - HostInformationMessage hostOutput = record.MessageData as HostInformationMessage; - if (hostOutput != null) { - string message = hostOutput.Message; - Streams.Information.Add(message); - } - } - } - - public class TestHost : PSHost - { - private Guid _instanceId = Guid.NewGuid(); - private PSHostUserInterface _ui = new TestPSHostUserInterface(); - public string _hostName = "TEST HOST"; - public Version _version = new Version(6, 0); - int promptLevel = 0; - public override CultureInfo CurrentCulture - { - get { return Thread.CurrentThread.CurrentCulture; } - } - - public override CultureInfo CurrentUICulture - { - get { return Thread.CurrentThread.CurrentUICulture; } - } - - public override Guid InstanceId - { - get { return _instanceId; } - } - - public override string Name - { - get { return _hostName; } - } - - public override PSHostUserInterface UI - { - get { return _ui; } - } - - public override Version Version - { - get { return _version; } - } - - public override void EnterNestedPrompt() - { - promptLevel++; - } - - public override void ExitNestedPrompt() - { - promptLevel--; - } - - public override void NotifyBeginApplication() - { - throw new NotImplementedException(); - } - - public override void NotifyEndApplication() - { - throw new NotImplementedException(); - } - - public override void SetShouldExit(int exitCode) - { - throw new NotImplementedException(); - } - } -} - -'@ -## ' -function New-TestHost -{ - If ($IsCoreCLR) - { - $references = @() - } - else - { - $references = "System.Management.Automation" - } - - if ( ! ("TestHost.TestHost" -as "type" )) { - $t = add-Type -pass $definition -ref $references - } - - [TestHost.TestHost]::New() -} - +$definition = @' +using System; +using System.Collections.Generic; +using System.Threading; +using System.Management.Automation; +using System.Management.Automation.Host; +using System.Globalization; +using System.Collections.ObjectModel; +using System.Security; +using System.Collections; + +namespace TestHost +{ + public class TestHostRawUI : PSHostRawUserInterface + { + private ConsoleColor _backgroundColor = ConsoleColor.Black; + public override ConsoleColor BackgroundColor + { + get { return _backgroundColor; } + set { _backgroundColor = value; } + } + private ConsoleColor _foregroundColor = ConsoleColor.White; + public override ConsoleColor ForegroundColor + { + get { return _foregroundColor; } + set { _foregroundColor = value; } + } + private string _windowTitle = "title"; + public override string WindowTitle + { + get { return _windowTitle; } + set { _windowTitle = value; } + } + private Size _bufferSize = new Size(10,10); + public override Size BufferSize + { + get { return _bufferSize; } + set { _bufferSize = value; } + } + private Coordinates _cursorPosition = new Coordinates(0, 0); + public override Coordinates CursorPosition + { + get { return _cursorPosition; } + set { _cursorPosition = value; } + } + private int _cursorSize = 10; + public override int CursorSize + { + get { return _cursorSize; } + set { _cursorSize = value; } + } + private bool _keyAvailable = false; + public override bool KeyAvailable + { + get { return _keyAvailable; } + } + public override Size MaxPhysicalWindowSize + { + get { throw new NotImplementedException(); } + } + public override Size MaxWindowSize + { + get { throw new NotImplementedException(); } + } + private Coordinates _windowPosition = new Coordinates(0, 0); + public override Coordinates WindowPosition + { + get { return _windowPosition; } + + set { _windowPosition = value; } + } + private Size _windowSize = new Size(80, 40); + public override Size WindowSize + { + get { return _windowSize; } + set { _windowSize = value; } + } + public override BufferCell[,] GetBufferContents(Rectangle rectangle) { throw new NotImplementedException(); } + public override void FlushInputBuffer() { throw new NotImplementedException(); } + public override KeyInfo ReadKey(ReadKeyOptions options) { throw new NotImplementedException(); } + public override void SetBufferContents(Coordinates origin, BufferCell[,] contents) { throw new NotImplementedException(); } + public override void SetBufferContents(Rectangle rectangle, BufferCell fill) { throw new NotImplementedException(); } + public override void ScrollBufferContents(Rectangle source, Coordinates destination, Rectangle clip, BufferCell fill) { throw new NotImplementedException(); } + } + + public class Streams + { + public ArrayList ConsoleOutput = new ArrayList(); + public ArrayList Input = new ArrayList(); + public ArrayList Error = new ArrayList(); + public ArrayList Verbose = new ArrayList(); + public ArrayList Debug = new ArrayList(); + public ArrayList Warning = new ArrayList(); + public ArrayList Information = new ArrayList(); + public ArrayList Progress = new ArrayList(); + public ArrayList Prompt = new ArrayList(); + public void Clear() { + ConsoleOutput.Clear(); + Input.Clear(); + Error.Clear(); + Verbose.Clear(); + Debug.Clear(); + Warning.Clear(); + Information.Clear(); + Progress.Clear(); + Prompt.Clear(); + } + } + public class TestPSHostUserInterface : PSHostUserInterface + { + private PSHostRawUserInterface _rawui = new TestHostRawUI(); + public string ReadLineData = "This is readline data"; + public int PromptedChoice = 0; + public string StringForSecureString = "TEST"; + public string UserNameForCredential = "Admin"; + public object promptResponse = "this is a prompt response"; + + public Streams Streams = new Streams(); + public override PSHostRawUserInterface RawUI + { + get { return _rawui; } + } + + public override Dictionary Prompt(string caption, string message, Collection descriptions) + { + if (descriptions == null || descriptions[0] == null) + { + throw new ArgumentException("descriptions"); + } + + string s = descriptions[0].Name; + Streams.Prompt.Add(caption + ":" + message + ":" + s); + Dictionary d = new Dictionary(); + d.Add(s, new PSObject(promptResponse)); + return d; + } + + public override int PromptForChoice(string caption, string message, Collection choices, int defaultChoice) + { + Streams.Prompt.Add(caption + ":" + message); + return PromptedChoice; + } + + public override PSCredential PromptForCredential(string caption, string message, string userName, string targetName) + { + Streams.Prompt.Add("Credential:" + caption + ":" + message); + SecureString ss = ReadLineAsSecureString(); + string userNameToUse = string.IsNullOrEmpty(userName) ? UserNameForCredential : userName; + return new PSCredential(userNameToUse, ss); + } + + public override PSCredential PromptForCredential(string caption, string message, string userName, string targetName, PSCredentialTypes allowedCredentialTypes, PSCredentialUIOptions options) + { + Streams.Prompt.Add("Credential:" + caption + ":" + message); + SecureString ss = ReadLineAsSecureString(); + string userNameToUse = string.IsNullOrEmpty(userName) ? UserNameForCredential : userName; + return new PSCredential(userNameToUse, ss); + } + + public override string ReadLine() + { + return ReadLineData; + } + + public override SecureString ReadLineAsSecureString() + { + SecureString ss = new SecureString(); + foreach(char c in StringForSecureString.ToCharArray()) { ss.AppendChar(c); } + return ss; + } + + // Cmdlets call 'Write' and 'WriteLine' methods implicitly. + // To see difference between 'Write' and 'WriteLine' with and w/o colors in the debug output + // we need use a meta information. + // So we make a output string as: + // : : <'user value'> : <'NewLine' or 'NoNewLine'> + // + public override void Write(string value) + { + Streams.ConsoleOutput.Add("::"+value+":NoNewLine"); + } + + public override void Write(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string value) + { + Streams.ConsoleOutput.Add(foregroundColor+":"+backgroundColor+":"+value+":NoNewLine"); + } + + public override void WriteLine(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string value) + { + Streams.ConsoleOutput.Add(foregroundColor+":"+backgroundColor+":"+value+":NewLine"); + } + + public override void WriteDebugLine(string message) + { + Streams.Debug.Add(message); + } + + public override void WriteErrorLine(string value) + { + Streams.Error.Add(value); + } + + public override void WriteLine(string value) + { + Streams.ConsoleOutput.Add("::"+value+":NewLine"); + } + + public override void WriteProgress(long sourceId, ProgressRecord record) + { + Streams.Progress.Add(record); + } + + public override void WriteVerboseLine(string message) + { + Streams.Verbose.Add(message); + } + + public override void WriteWarningLine(string message) + { + Streams.Warning.Add(message); + } + + public override void WriteInformation(InformationRecord record) + { + HostInformationMessage hostOutput = record.MessageData as HostInformationMessage; + if (hostOutput != null) { + string message = hostOutput.Message; + Streams.Information.Add(message); + } + } + } + + public class TestHost : PSHost + { + private Guid _instanceId = Guid.NewGuid(); + private PSHostUserInterface _ui = new TestPSHostUserInterface(); + public string _hostName = "TEST HOST"; + public Version _version = new Version(6, 0); + int promptLevel = 0; + public override CultureInfo CurrentCulture + { + get { return Thread.CurrentThread.CurrentCulture; } + } + + public override CultureInfo CurrentUICulture + { + get { return Thread.CurrentThread.CurrentUICulture; } + } + + public override Guid InstanceId + { + get { return _instanceId; } + } + + public override string Name + { + get { return _hostName; } + } + + public override PSHostUserInterface UI + { + get { return _ui; } + } + + public override Version Version + { + get { return _version; } + } + + public override void EnterNestedPrompt() + { + promptLevel++; + } + + public override void ExitNestedPrompt() + { + promptLevel--; + } + + public override void NotifyBeginApplication() + { + throw new NotImplementedException(); + } + + public override void NotifyEndApplication() + { + throw new NotImplementedException(); + } + + public override void SetShouldExit(int exitCode) + { + throw new NotImplementedException(); + } + } +} + +'@ +## ' +function New-TestHost +{ + If ($IsCoreCLR) + { + $references = @() + } + else + { + $references = "System.Management.Automation" + } + + if ( ! ("TestHost.TestHost" -as "type" )) { + $t = add-Type -pass $definition -ref $references + } + + [TestHost.TestHost]::New() +} diff --git a/test/tools/Modules/HelpersLanguage/HelpersLanguage.psd1 b/test/tools/Modules/HelpersLanguage/HelpersLanguage.psd1 new file mode 100644 index 0000000000..b71a9c8ef0 --- /dev/null +++ b/test/tools/Modules/HelpersLanguage/HelpersLanguage.psd1 @@ -0,0 +1,22 @@ +# +# Module manifest for module 'HelpersLanguage' +# + +@{ + +RootModule = 'HelpersLanguage.psm1' + +ModuleVersion = '1.0' + +GUID = 'a575af5e-2bd1-427f-b966-48640788896b' + +CompanyName = 'Microsoft Corporation' + +Copyright = 'Copyright (C) Microsoft Corporation, All rights reserved.' + +Description = 'Temporary module for language tests' + +FunctionsToExport = 'Get-ParseResults', 'Get-RuntimeError', 'ShouldBeParseError', + 'Test-ErrorStmt', 'Test-Ast', 'Test-ErrorStmtForSwitchFlag' + +} diff --git a/test/powershell/Language/LanguageTestSupport.psm1 b/test/tools/Modules/HelpersLanguage/HelpersLanguage.psm1 similarity index 96% rename from test/powershell/Language/LanguageTestSupport.psm1 rename to test/tools/Modules/HelpersLanguage/HelpersLanguage.psm1 index 742b521c4f..814df79fe7 100644 --- a/test/powershell/Language/LanguageTestSupport.psm1 +++ b/test/tools/Modules/HelpersLanguage/HelpersLanguage.psm1 @@ -1,193 +1,193 @@ - -# -# Run the new parser, return either errors or the ast -# -function Get-ParseResults -{ - [CmdletBinding()] - param( - [Parameter(ValueFromPipeline=$True,Mandatory=$True)] - [string]$src, - [switch]$Ast - ) - - $errors = $null - $result = [System.Management.Automation.Language.Parser]::ParseInput($src, [ref]$null, [ref]$errors) - if ($Ast) { $result } else { ,$errors } -} - -# -# Run script and return errors -# -function Get-RuntimeError -{ - [CmdletBinding()] - param( - [Parameter(ValueFromPipeline=$True,Mandatory=$True)][string]$src - ) - - $errors = $null - try - { - [scriptblock]::Create($src).Invoke() > $null - } - catch - { - return $_.Exception.InnerException.ErrorRecord - } -} - -function position_message -{ - param($position) - - if ($position.Line.Length -lt $position.ColumnNumber) - { - $position.Line + " <<<<" - } - else - { - $position.Line.Insert($position.ColumnNumber, " <<<<") - } -} - - -# -# Pester friendly version of Test-Error -# -function ShouldBeParseError -{ - [CmdletBinding()] - param( - [string]$src, - [string[]]$expectedErrors, - [int[]]$expectedOffsets, - # This is a temporary solution after moving type creation from parse time to runtime - [switch]$SkipAndCheckRuntimeError, - # for test coverarage purpose, tests validate columnNumber or offset - [switch]$CheckColumnNumber, - # Skip this test in Travis CI nightly build - [switch]$SkipInTravisFullBuild - ) - - # - # CrossGen'ed assemblies cause a hang to happen when running tests with this helper function in Linux and OSX. - # The issue has been reported to CoreCLR team. We need to work around it for now with the following approach: - # 1. For pull request and push commit, build without '-CrossGen' and run the parsing tests - # 2. For nightly build, build with '-CrossGen' but don't run the parsing tests - # In this way, we will continue to exercise these parsing tests for each CI build, and skip them for nightly - # build to avoid a hang. - # Note: this change should be reverted once the 'CrossGen' issue is fixed by CoreCLR. The issue is tracked by - # https://github.com/dotnet/coreclr/issues/9745 - # - if ($SkipInTravisFullBuild) { - ## Report that we skipped the test and return - It "Parse error expected: <<$src>>" -Skip {} - return - } - - Context "Parse error expected: <<$src>>" { - # Test case error if this fails - $expectedErrors.Count | Should Be $expectedOffsets.Count - - if ($SkipAndCheckRuntimeError) - { - It "error should happen at parse time, not at runtime" -Skip {} - $errors = Get-RuntimeError -Src $src - # for runtime errors we will only get the first one - $expectedErrors = ,$expectedErrors[0] - $expectedOffsets = ,$expectedOffsets[0] - } - else - { - $errors = Get-ParseResults -Src $src - } - - It "Error count" { $errors.Count | Should Be $expectedErrors.Count } - for ($i = 0; $i -lt $errors.Count; ++$i) - { - $err = $errors[$i] - - if ($SkipAndCheckRuntimeError) - { - $errorId = $err.FullyQualifiedErrorId - } - else - { - $errorId = $err.ErrorId - } - It "Error Id" { $errorId | Should Be $expectedErrors[$i] } - $acutalPostion = $err.Extent.StartScriptPosition.Offset - if ( $CheckColumnNumber ) { $acutalPostion = $err.Extent.StartScriptPosition.ColumnNumber } - It "Error position" -Pending:$SkipAndCheckRuntimeError { $acutalPostion | Should Be $expectedOffsets[$i] } - } - } -} - - -function Flatten-Ast -{ - [CmdletBinding()] - param([System.Management.Automation.Language.Ast] $ast) - - $ast - $ast | gm -type property | ? { ($prop = $_.Name) -ne 'Parent' } | % { - $ast.$prop | ? { $_ -is [System.Management.Automation.Language.Ast] } | % { Flatten-Ast $_ } - } -} - -function Test-ErrorStmt -{ - param([string]$src, [string]$errorStmtExtent) - $a = $args - Context "Error Statement expected: <<$src>>" { - $ast = Get-ParseResults $src -Ast - $asts = @(Flatten-Ast $ast.EndBlock.Statements[0]) - - It 'Type is ErrorStatementAst' { $asts[0] | Should BeOfType System.Management.Automation.Language.ErrorStatementAst } - It "`$asts.count" { $asts.Count | Should Be ($a.Count + 1) } - It "`$asts[0].Extent.Text" { $asts[0].Extent.Text | Should Be $errorStmtExtent } - for ($i = 0; $i -lt $a.Count; ++$i) - { - It "`$asts[$($i + 1)].Extent.Text" { $asts[$i + 1].Extent.Text | Should Be $a[$i] } - } - } -} - -function Test-Ast -{ - param([string]$src) - $a = $args - $ast = Get-ParseResults $src -Ast - $asts = @(Flatten-Ast $ast) - Context "Ast Validation: <<$src>>" { - It "`$asts.count" { $asts.Count | Should Be $a.Count } - for ($i = 0; $i -lt $a.Count; ++$i) - { - It "`$asts[$i].Extent.Text" { $asts[$i].Extent.Text | Should Be $a[$i] } - } - } -} - -## ErrorStatement is special for SwitchStatement - function Test-ErrorStmtForSwitchFlag - { - param([string]$src, [string]$flagName) - $a = $args - $ast = Get-ParseResults $src -Ast - $ast = $ast.EndBlock.Statements[0] - Context "Ast Validation: <<$src>>" { - $ast | Should BeOfType System.Management.Automation.Language.ErrorStatementAst - $ast.Flags.ContainsKey($flagName) | Should be $true - - $asts = @(Flatten-Ast $ast.Flags[$flagName].Item2) - - $asts.Count | Should Be $a.Count - for ($i = 0; $i -lt $a.Count; ++$i) - { - $asts[$i].Extent.Text | Should Be $a[$i] - } - } - } - -Export-ModuleMember -Function Test-ErrorStmt, Test-Ast, ShouldBeParseError, Get-ParseResults, Get-RuntimeError, Test-ErrorStmtForSwitchFlag +# +# Run the new parser, return either errors or the ast +# + +function Get-ParseResults +{ + [CmdletBinding()] + param( + [Parameter(ValueFromPipeline=$True,Mandatory=$True)] + [string]$src, + [switch]$Ast + ) + + $errors = $null + $result = [System.Management.Automation.Language.Parser]::ParseInput($src, [ref]$null, [ref]$errors) + if ($Ast) { $result } else { ,$errors } +} + +# +# Run script and return errors +# +function Get-RuntimeError +{ + [CmdletBinding()] + param( + [Parameter(ValueFromPipeline=$True,Mandatory=$True)][string]$src + ) + + $errors = $null + try + { + [scriptblock]::Create($src).Invoke() > $null + } + catch + { + return $_.Exception.InnerException.ErrorRecord + } +} + +function position_message +{ + param($position) + + if ($position.Line.Length -lt $position.ColumnNumber) + { + $position.Line + " <<<<" + } + else + { + $position.Line.Insert($position.ColumnNumber, " <<<<") + } +} + + +# +# Pester friendly version of Test-Error +# +function ShouldBeParseError +{ + [CmdletBinding()] + param( + [string]$src, + [string[]]$expectedErrors, + [int[]]$expectedOffsets, + # This is a temporary solution after moving type creation from parse time to runtime + [switch]$SkipAndCheckRuntimeError, + # for test coverarage purpose, tests validate columnNumber or offset + [switch]$CheckColumnNumber, + # Skip this test in Travis CI nightly build + [switch]$SkipInTravisFullBuild + ) + + # + # CrossGen'ed assemblies cause a hang to happen when running tests with this helper function in Linux and OSX. + # The issue has been reported to CoreCLR team. We need to work around it for now with the following approach: + # 1. For pull request and push commit, build without '-CrossGen' and run the parsing tests + # 2. For nightly build, build with '-CrossGen' but don't run the parsing tests + # In this way, we will continue to exercise these parsing tests for each CI build, and skip them for nightly + # build to avoid a hang. + # Note: this change should be reverted once the 'CrossGen' issue is fixed by CoreCLR. The issue is tracked by + # https://github.com/dotnet/coreclr/issues/9745 + # + if ($SkipInTravisFullBuild) { + ## Report that we skipped the test and return + It "Parse error expected: <<$src>>" -Skip {} + return + } + + Context "Parse error expected: <<$src>>" { + # Test case error if this fails + $expectedErrors.Count | Should Be $expectedOffsets.Count + + if ($SkipAndCheckRuntimeError) + { + It "error should happen at parse time, not at runtime" -Skip {} + $errors = Get-RuntimeError -Src $src + # for runtime errors we will only get the first one + $expectedErrors = ,$expectedErrors[0] + $expectedOffsets = ,$expectedOffsets[0] + } + else + { + $errors = Get-ParseResults -Src $src + } + + It "Error count" { $errors.Count | Should Be $expectedErrors.Count } + for ($i = 0; $i -lt $errors.Count; ++$i) + { + $err = $errors[$i] + + if ($SkipAndCheckRuntimeError) + { + $errorId = $err.FullyQualifiedErrorId + } + else + { + $errorId = $err.ErrorId + } + It "Error Id" { $errorId | Should Be $expectedErrors[$i] } + $acutalPostion = $err.Extent.StartScriptPosition.Offset + if ( $CheckColumnNumber ) { $acutalPostion = $err.Extent.StartScriptPosition.ColumnNumber } + It "Error position" -Pending:$SkipAndCheckRuntimeError { $acutalPostion | Should Be $expectedOffsets[$i] } + } + } +} + + +function Flatten-Ast +{ + [CmdletBinding()] + param([System.Management.Automation.Language.Ast] $ast) + + $ast + $ast | gm -type property | ? { ($prop = $_.Name) -ne 'Parent' } | % { + $ast.$prop | ? { $_ -is [System.Management.Automation.Language.Ast] } | % { Flatten-Ast $_ } + } +} + +function Test-ErrorStmt +{ + param([string]$src, [string]$errorStmtExtent) + $a = $args + Context "Error Statement expected: <<$src>>" { + $ast = Get-ParseResults $src -Ast + $asts = @(Flatten-Ast $ast.EndBlock.Statements[0]) + + It 'Type is ErrorStatementAst' { $asts[0] | Should BeOfType System.Management.Automation.Language.ErrorStatementAst } + It "`$asts.count" { $asts.Count | Should Be ($a.Count + 1) } + It "`$asts[0].Extent.Text" { $asts[0].Extent.Text | Should Be $errorStmtExtent } + for ($i = 0; $i -lt $a.Count; ++$i) + { + It "`$asts[$($i + 1)].Extent.Text" { $asts[$i + 1].Extent.Text | Should Be $a[$i] } + } + } +} + +function Test-Ast +{ + param([string]$src) + $a = $args + $ast = Get-ParseResults $src -Ast + $asts = @(Flatten-Ast $ast) + Context "Ast Validation: <<$src>>" { + It "`$asts.count" { $asts.Count | Should Be $a.Count } + for ($i = 0; $i -lt $a.Count; ++$i) + { + It "`$asts[$i].Extent.Text" { $asts[$i].Extent.Text | Should Be $a[$i] } + } + } +} + +## ErrorStatement is special for SwitchStatement + function Test-ErrorStmtForSwitchFlag + { + param([string]$src, [string]$flagName) + $a = $args + $ast = Get-ParseResults $src -Ast + $ast = $ast.EndBlock.Statements[0] + Context "Ast Validation: <<$src>>" { + $ast | Should BeOfType System.Management.Automation.Language.ErrorStatementAst + $ast.Flags.ContainsKey($flagName) | Should be $true + + $asts = @(Flatten-Ast $ast.Flags[$flagName].Item2) + + $asts.Count | Should Be $a.Count + for ($i = 0; $i -lt $a.Count; ++$i) + { + $asts[$i].Extent.Text | Should Be $a[$i] + } + } + } + +Export-ModuleMember -Function Test-ErrorStmt, Test-Ast, ShouldBeParseError, Get-ParseResults, Get-RuntimeError, Test-ErrorStmtForSwitchFlag diff --git a/test/tools/Modules/HelpersRemoting/HelpersRemoting.psd1 b/test/tools/Modules/HelpersRemoting/HelpersRemoting.psd1 new file mode 100644 index 0000000000..46fe8e3902 --- /dev/null +++ b/test/tools/Modules/HelpersRemoting/HelpersRemoting.psd1 @@ -0,0 +1,21 @@ +# +# Module manifest for module 'TestRemoting' +# + +@{ + +RootModule = 'HelpersRemoting.psm1' + +ModuleVersion = '1.0' + +GUID = '7acf3c68-64f4-4550-bf14-b9361bfbfea3' + +CompanyName = 'Microsoft Corporation' + +Copyright = 'Copyright (C) Microsoft Corporation, All rights reserved.' + +Description = 'Temporary module for remoting tests' + +FunctionsToExport = 'New-RemoteRunspace', 'New-RemoteSession' + +} diff --git a/test/tools/Modules/TestRemoting/TestRemoting.psm1 b/test/tools/Modules/HelpersRemoting/HelpersRemoting.psm1 similarity index 100% rename from test/tools/Modules/TestRemoting/TestRemoting.psm1 rename to test/tools/Modules/HelpersRemoting/HelpersRemoting.psm1 diff --git a/test/tools/Modules/TestHostCS/TestHostCS.psd1 b/test/tools/Modules/TestHostCS/TestHostCS.psd1 deleted file mode 100644 index 60589ef2aa..0000000000 --- a/test/tools/Modules/TestHostCS/TestHostCS.psd1 +++ /dev/null @@ -1,38 +0,0 @@ -# -# Module manifest for module 'TestHostCS' -# - -@{ - -# Script module or binary module file associated with this manifest. -RootModule = 'TestHostCS.psm1' - -# Version number of this module. -ModuleVersion = '1.0' - -# ID used to uniquely identify this module -GUID = '40a19c05-d765-41a1-995e-98ca5f247ee1' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = 'Copyright (C) Microsoft Corporation, All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Simple console host for console IO tests.' - -# Functions to export from this module -FunctionsToExport = 'New-TestHost' - -# Cmdlets to export from this module -#CmdletsToExport = '*' - -# Variables to export from this module -#VariablesToExport = '*' - -# Aliases to export from this module -#AliasesToExport = '*' - -} - diff --git a/test/tools/Modules/TestRemoting/TestRemoting.psd1 b/test/tools/Modules/TestRemoting/TestRemoting.psd1 deleted file mode 100644 index 81b8cf964e..0000000000 --- a/test/tools/Modules/TestRemoting/TestRemoting.psd1 +++ /dev/null @@ -1,37 +0,0 @@ -# -# Module manifest for module 'TestRemoting' -# - -@{ - -# Script module or binary module file associated with this manifest. -RootModule = 'TestRemoting.psm1' - -# Version number of this module. -ModuleVersion = '1.0' - -# ID used to uniquely identify this module -GUID = '7acf3c68-64f4-4550-bf14-b9361bfbfea3' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = 'Copyright (C) Microsoft Corporation, All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Temporary module for remoting tests' - -# Functions to export from this module -FunctionsToExport = 'New-RemoteRunspace', 'New-RemoteSession' - -# Cmdlets to export from this module -#CmdletsToExport = '*' - -# Variables to export from this module -#VariablesToExport = '*' - -# Aliases to export from this module -#AliasesToExport = '*' - -}