Skip to content

Conversation

@anmenaga
Copy link

PR Summary

It turns out that some tests rely on having 'pwsh' executable for starting powershell.
This is not the case when framework dependent 'fxdependent' package is used (in which case PS is started by command like dotnet /opt/microsoft/powershell/pwsh.dll.

Specifically ModulePath.Tests are used in package validation before every PS release and failures in them block testing fxdependent package that we are adding.

The fix is to skip failing tests that rely on 'pwsh' executable in testing fxdependent package.
A better fix would be to add a generic test utility function that returns proper PS starting command based on environment where Pester runs. But since current failures are blocking package validation, we can add this utility function later (I'll open an test issue to track this).

PR Checklist

@anmenaga anmenaga added the WG-Quality-Test issues in a test or in test infrastructure label Sep 12, 2018
$expectedSystemPath = Join-Path -Path $PSHOME -ChildPath 'Modules'

# Skip these tests in cases when there is no 'pwsh' executable (e.g. when framework dependent PS package is used)
if ( -not (Test-Path $powershell))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be

$skipNoPwsh = -not (Test-Path $powershell)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@adityapatwardhan
Copy link
Member

Using administrator privileges to merge as the spellings CI did not trigger. This PR does not have any markdown content.

@adityapatwardhan adityapatwardhan merged commit e725a03 into PowerShell:master Sep 17, 2018
@anmenaga anmenaga deleted the UpdatingModulepathTests branch October 31, 2018 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WG-Quality-Test issues in a test or in test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants