Repository navigation
Closed
Labels
OS-macOSResolution-AnsweredThe question is answered.WG-Quality-Testissues in a test or in test infrastructure
Description
Steps to reproduce
- Clone the repo on macOS 10.12.5
- Open a PowerShell instance from the latest package-installed version (beta4)
Set-Locationto the cloned repo.- Run
ipmo ./build - Run
Start-PSBootstrap - Run
Start-PSBuild -Clean - Run
Start-PSPester
Expected behavior
All steps should succeed, including all tests.
Actual behavior
The Start-PSPester step fails as follows:
Describing PackageManagement Acceptance Test
[-] Error occurred in Describe block 88ms
The term 'Register-PackageSource' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At /Users/mklement/Projects/OSS/PowerShell.Org/test/powershell/Modules/PackageManagement/PackageManagement.Tests.ps1:23 char:5
Describing PowerShellGet - Module tests
Import-Module : The specified module 'PackageManagement' was not loaded because no valid module file was found in any module directory.
At /Users/mklement/Projects/OSS/PowerShell.Org/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1:73 char:5
+ Import-Module PackageManagement
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (PackageManagement:String) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
[-] Error occurred in Describe block 152ms
The term 'Get-PackageProvider' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At /Users/mklement/Projects/OSS/PowerShell.Org/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1:74 char:5
[-] Error occurred in test script '/Users/mklement/Projects/OSS/PowerShell.Org/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1' 139ms
Cannot index into a null array.
at Describe, /Users/mklement/Projects/OSS/PowerShell.Org/src/powershell-unix/bin/Linux/netcoreapp2.0/osx.10.12-x64/publish/Modules/Pester/Functions/Describe.ps1: line 117
[-] Error occurred in test script '/Users/mklement/Projects/OSS/PowerShell.Org/test/powershell/Modules/PSDesiredStateConfiguration/MOF-Compilation.Tests.ps1' 123ms
Exception calling "EnterDescribe" with "1" argument(s): "You already are in Describe, you cannot enter Describe twice"
at Describe, /Users/mklement/Projects/OSS/PowerShell.Org/src/powershell-unix/bin/Linux/netcoreapp2.0/osx.10.12-x64/publish/Modules/Pester/Functions/Describe.ps1: line 85
[-] Error occurred in test script '/Users/mklement/Projects/OSS/PowerShell.Org/test/powershell/Modules/PSReadLine/PSReadLine.Tests.ps1' 115ms
Exception calling "EnterDescribe" with "1" argument(s): "You already are in Describe, you cannot enter Describe twice"
at Describe, /Users/mklement/Projects/OSS/PowerShell.Org/src/powershell-unix/bin/Linux/netcoreapp2.0/osx.10.12-x64/publish/Modules/Pester/Functions/Describe.ps1: line 85
[-] Error occurred in test script '/Users/mklement/Projects/OSS/PowerShell.Org/test/powershell/Provider/ProviderIntrinsics.Tests.ps1' 125ms
Exception calling "EnterDescribe" with "1" argument(s): "You already are in Describe, you cannot enter Describe twice"
at Describe, /Users/mklement/Projects/OSS/PowerShell.Org/src/powershell-unix/bin/Linux/netcoreapp2.0/osx.10.12-x64/publish/Modules/Pester/Functions/Describe.ps1: line 85
[-] Error occurred in test script '/Users/mklement/Projects/OSS/PowerShell.Org/test/powershell/SDK/Json.Tests.ps1' 127ms
Exception calling "EnterDescribe" with "1" argument(s): "You already are in Describe, you cannot enter Describe twice"
at Describe, /Users/mklement/Projects/OSS/PowerShell.Org/src/powershell-unix/bin/Linux/netcoreapp2.0/osx.10.12-x64/publish/Modules/Pester/Functions/Describe.ps1: line 85
[-] Error occurred in test script '/Users/mklement/Projects/OSS/PowerShell.Org/test/powershell/SDK/PSDebugging.Tests.ps1' 121ms
Exception calling "EnterDescribe" with "1" argument(s): "You already are in Describe, you cannot enter Describe twice"
at Describe, /Users/mklement/Projects/OSS/PowerShell.Org/src/powershell-unix/bin/Linux/netcoreapp2.0/osx.10.12-x64/publish/Modules/Pester/Functions/Describe.ps1: line 85
Tests completed in 348.08s
Passed: 5298 Failed: 8 Skipped: 609 Pending: 149
Environment data
PowerShell Core post-v6.0.0-beta.4, with master branch as of 22 Jul 2017Metadata
Metadata
Assignees
Labels
OS-macOSResolution-AnsweredThe question is answered.WG-Quality-Testissues in a test or in test infrastructure
Activity
bmanikm commentedon Jul 24, 2017
Michael Klement (@mklement0)
You will have to specify -PSModuleRestore switch on Start-PSBuild command.
mklement0 commentedon Jul 24, 2017
Thanks, Manikyam Bavandla (@bmanikm), that did the trick, assuming that:
I shouldn't be concerned that today's master branch builds as
v6.0.0-beta.3-86-g905e6978e6e21f803bb71569a4b2956ccb13d4b6- not the beta 3.Start-PSPesternow reportingPassed: 5343 Failed: 0 Skipped: 611 Pending: 152is the expected outcome. (Number of skipped tests expected? What are pending tasks?)Either way, I suggest updating the existing build instructions
and the FAQ entry about failing builds (even though this issue was about tests, not builds - time for a FAQ entry about failing tests?)
with respect to
-PSModuleRestorein general, and in particular with respect to when it is needed (always? only after ...?)