Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix code-format and test invocation through PowerShell #10465

Merged

Conversation

ianjoneill
Copy link
Contributor

@ianjoneill ianjoneill commented Jun 20, 2021

Fixes the Invoke-CodeFormat and Invoke-OpenConsoleTests functions in OpenConsole.psm1 so that they can be run directly from PowerShell.

Addresses the issues found when creating #10447.

Invoke-CodeFormat did not work when invoked directly from PowerShell due to a relative path being passed into the .NET function [IO.File]::WriteAllLines(). The working directory for .NET objects does not change when you change directory in PowerShell, so the paths were being treated as relative to the initial working directory of the shell - which was not the terminal git repo.

Invoke-OpenConsoleTests had 3 issues:

  1. The path to TestHostApp was wrong.
  2. It would attempt to run the "in host app" tests both in the host app and not in the host app.
  3. The test configuration in tests.xml wasn't in sync with the runABC.cmd files, so the remoting and control unit tests didn't run.

Validation Steps Performed

  1. Ran Invoke-CodeFormat and runformat.cmd from multiple directories and didn't see errors.
  2. Ran Invoke-OpenConsoleTests and didn't see errors.

@DHowett
Copy link
Member

DHowett commented Jun 21, 2021

Thanks for this!

@DHowett DHowett added the Needs-Second It's a PR that needs another sign-off label Jun 21, 2021
@DHowett
Copy link
Member

DHowett commented Jun 21, 2021

Note for second reviewer: Manually merge (please update commit body to match PR body when you do!) because this will not run CI.

@lhecker lhecker merged commit c8f00df into microsoft:main Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Second It's a PR that needs another sign-off
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants