GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Updating ModulePath.Tests for fxdependent package by anmenaga · Pull Request #7772 · PowerShell/PowerShell

Conversation

@anmenaga

@anmenaga Andrew (anmenaga) commented Sep 12, 2018

Copy link
Copy Markdown

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

  • PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • Summarized changes
  • Change is not breaking
  • Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
  • This PR is ready to merge and is not Work in Progress.
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready.
  • User-facing changes
    • Not Applicable
    • OR
    • User-facing Documentation needed
      • Issue filed - Issue link:
  • Testing - New and feature
    • Not Applicable or can only be tested interactively
    • OR
    • Make sure you've added a new test if existing tests do not effectively test the code changed
      • Add [feature] if the change is significant or affects feature tests

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Andrew Menagarishvili
Updating ModulePath.Tests for fxdependent package
df07e2f
@anmenaga Andrew (anmenaga) added the WG-Quality-Test issues in a test or in test infrastructure label Sep 12, 2018
@anmenaga
Andrew (anmenaga) requested review from James Truher (JamesWTruher) and Aditya Patwardhan (adityapatwardhan) September 12, 2018 20:56
adityapatwardhan
Aditya Patwardhan (adityapatwardhan) requested changes Sep 12, 2018
View reviewed changes
Comment thread test/powershell/engine/Module/ModulePath.Tests.ps1 Outdated
$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))

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Sep 12, 2018

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

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)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@anmenaga Andrew (anmenaga) Sep 12, 2018

Copy link
Copy Markdown
Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Updated.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Andrew Menagarishvili
replaced if condition with shorter syntax
bf2c7b6
iSazonov
Ilya (iSazonov) approved these changes Sep 13, 2018
View reviewed changes
@iSazonov Ilya (iSazonov) assigned Aditya Patwardhan (adityapatwardhan) Sep 13, 2018
adityapatwardhan
Aditya Patwardhan (adityapatwardhan) approved these changes Sep 17, 2018
View reviewed changes
@adityapatwardhan

Aditya Patwardhan (adityapatwardhan) commented Sep 17, 2018

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) merged commit e725a03 into PowerShell:master Sep 17, 2018
@anmenaga
Andrew (anmenaga) deleted the UpdatingModulepathTests branch October 31, 2018 21:15
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
Andrew @adityapatwardhan
Updating ModulePath.Tests for fxdependent package (PowerShell#7772)
ab373f5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) adityapatwardhan approved these changes
@iSazonov Ilya (iSazonov) iSazonov approved these changes
@JamesWTruher James Truher (JamesWTruher) Awaiting requested review from JamesWTruher

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@adityapatwardhan Aditya Patwardhan (adityapatwardhan)

Labels

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

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@anmenaga @adityapatwardhan @iSazonov
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.