Updating ModulePath.Tests for fxdependent package #7772
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.[feature]if the change is significant or affects feature tests