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 — Fix xunnit test for PS by chunqingchen · Pull Request #4780 · PowerShell/PowerShell

Conversation

@chunqingchen

@chunqingchen Chunqing Chen (chunqingchen) commented Sep 8, 2017 •
edited by daxian-dbw
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Fixes #852 #851
This is to enable xunit test on all platforms.

This fix includes following change:

  • Change test framework from visualstudio xunit to Dotnet Xunit, now the tests can be run on multiple platforms
  • Modify any tests that will fail the test build.
  • Added a function Test-XUnitTestResults for analyze PSxUnit output.
  • Added fx-version workaround for dotnet xunit
  • Updated appveyor.ps1 to run Start-PsXunit for daily builds.
  • Updated travis.ps1 to run Start-PsXunit for daily builds.

Sorry, something went wrong.

Uh oh!

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

All reactions
@chunqingchen
Chunqing Chen (chunqingchen) requested review from Travis Plunk (TravisEz13), Aditya Patwardhan (adityapatwardhan) and Dongbo Wang (daxian-dbw) as code owners September 8, 2017 00:22
@msftclas Microsoft Contribution License Agreements (msftclas) added the cla-not-required label Sep 8, 2017
@chunqingchen
Chunqing Chen (chunqingchen) force-pushed the xunitTest branch from d0b8a16 to db12347 Compare September 8, 2017 00:26
@daxian-dbw
Dongbo Wang (daxian-dbw) requested review from James Truher (JamesWTruher), Steve Lee (SteveL-MSFT) and Andrew (anmenaga) September 8, 2017 04:46
markekraus
Mark Kraus (markekraus) reviewed Sep 8, 2017
View reviewed changes
Comment thread build.psm1 Outdated

@markekraus Mark Kraus (markekraus) Sep 8, 2017

Copy link
Copy Markdown
Contributor

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 should probably stay before any calls made to dotnet.

Sorry, something went wrong.

Uh oh!

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

TravisEz13 and adityapatwardhan reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

@chunqingchen Chunqing Chen (chunqingchen) Sep 18, 2017

Copy link
Copy Markdown
Contributor 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.

resolved

Sorry, something went wrong.

Uh oh!

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

markekraus reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
JamesWTruher
James Truher (JamesWTruher) suggested changes Sep 8, 2017
View reviewed changes

@JamesWTruher James Truher (JamesWTruher) left a comment

Copy link
Copy Markdown
Collaborator

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.

a couple of the tests aren't testing the thing they purport to test, so they should be fixed or removed.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread test/csharp/test_ExtensionMethods.cs Outdated

@JamesWTruher James Truher (JamesWTruher) Sep 8, 2017

Copy link
Copy Markdown
Collaborator

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 doesn't seem to be checking the method on the PSTypeExtensions object. Shouldn't this be something like:
Assert.False(PSTypeExtensions.IsNumeric("string".GetType())
It should actually test the PSTypeExtensions object or just removed

Sorry, something went wrong.

Uh oh!

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

All reactions

@chunqingchen Chunqing Chen (chunqingchen) Sep 18, 2017

Copy link
Copy Markdown
Contributor 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.

resolved.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread test/csharp/test_Binders.cs Outdated

@JamesWTruher James Truher (JamesWTruher) Sep 8, 2017

Copy link
Copy Markdown
Collaborator

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.

see my comment below

Sorry, something went wrong.

Uh oh!

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

All reactions

@chunqingchen Chunqing Chen (chunqingchen) Sep 18, 2017

Copy link
Copy Markdown
Contributor 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.

resolved

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread test/csharp/test_CorePsPlatform.cs Outdated

@JamesWTruher James Truher (JamesWTruher) Sep 8, 2017

Copy link
Copy Markdown
Collaborator

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 isn't very useful and no longer tests what it is reported to test. This needs to check to see that the username returned by whoami is the same as Platform.Unix.UserName. Also, this is a non-windows only test. Is there a way to notate that?

Sorry, something went wrong.

Uh oh!

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

TravisEz13 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@chunqingchen Chunqing Chen (chunqingchen) Sep 19, 2017

Copy link
Copy Markdown
Contributor 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.

resolved

Sorry, something went wrong.

Uh oh!

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

All reactions
@daxian-dbw Dongbo Wang (daxian-dbw) assigned Aditya Patwardhan (adityapatwardhan) Sep 8, 2017
@chunqingchen
Chunqing Chen (chunqingchen) force-pushed the xunitTest branch from db12347 to 08d5cde Compare September 19, 2017 00:55
@TravisEz13

Travis Plunk (TravisEz13) commented Sep 19, 2017

Copy link
Copy Markdown
Member

James Truher (@JamesWTruher) Can you update your review?

All reactions

Sorry, something went wrong.

Uh oh!

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

@msftgits Microsoft GitHub User (msftgits) removed the cla-not-required label Sep 26, 2017
adityapatwardhan
Aditya Patwardhan (adityapatwardhan) requested changes Sep 26, 2017
View reviewed changes
Comment thread build.psm1 Outdated

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Sep 26, 2017

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.

How is a failure in xUnit propagated to a failure in AppVeyor / Travis?

Sorry, something went wrong.

Uh oh!

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

All reactions
JamesWTruher
James Truher (JamesWTruher) reviewed Sep 26, 2017
View reviewed changes

@JamesWTruher James Truher (JamesWTruher) left a comment

Copy link
Copy Markdown
Collaborator

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.

if everything actually runs on MacOS/Linux ok then I feel it would be better to get it in sooner rather than later. However, Aditya's question needs to be answered, how do we incorporate these results into our pester results?

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread test/csharp/test_CorePsPlatform.cs Outdated

@JamesWTruher James Truher (JamesWTruher) Sep 26, 2017

Copy link
Copy Markdown
Collaborator

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.

i believe that this is still not good for MacOS. hostname --fqdn is an error. Will this run on Mac?

Sorry, something went wrong.

Uh oh!

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

All reactions
@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) force-pushed the xunitTest branch from 08d5cde to fac8815 Compare October 25, 2017 20:54
@chunqingchen Chunqing Chen (chunqingchen) closed this Oct 30, 2017
@adityapatwardhan

Aditya Patwardhan (adityapatwardhan) commented Oct 30, 2017

Copy link
Copy Markdown
Member

Chunqing Chen (@chunqingchen) This needs to be open. I am working on it.

All reactions

Sorry, something went wrong.

Uh oh!

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

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) reopened this Oct 30, 2017
@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) force-pushed the xunitTest branch from cd552f4 to 91b85a8 Compare October 30, 2017 23:11
@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) force-pushed the xunitTest branch 2 times, most recently from bb3966b to d449465 Compare November 28, 2017 01:08
adityapatwardhan
Aditya Patwardhan (adityapatwardhan) approved these changes Nov 28, 2017
View reviewed changes
@adityapatwardhan

Aditya Patwardhan (adityapatwardhan) commented Nov 28, 2017

Copy link
Copy Markdown
Member

James Truher (@JamesWTruher) Dongbo Wang (@daxian-dbw) I have updated the PR with multiple changes list in the PR description. All tests pass in CI and the log file is uploaded to artifacts on AppVeyor. Please have look.

All reactions

Sorry, something went wrong.

Uh oh!

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

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) assigned Dongbo Wang (daxian-dbw) and unassigned Aditya Patwardhan (adityapatwardhan) Nov 28, 2017
JamesWTruher
James Truher (JamesWTruher) reviewed Nov 28, 2017
View reviewed changes
Comment thread build.psm1 Outdated

@JamesWTruher James Truher (JamesWTruher) Nov 28, 2017

Copy link
Copy Markdown
Collaborator

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 should probably be throw or something - if $results has a problem then it might look like everything passed since the error will likely be hidden in the log

Sorry, something went wrong.

Uh oh!

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

All reactions

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Nov 28, 2017

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.

added throw instead of Write-Error

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread build.psm1 Outdated

@JamesWTruher James Truher (JamesWTruher) Nov 28, 2017

Copy link
Copy Markdown
Collaborator

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.

can this be simplified to just:
if ( -not (test-path (get-psoutput)))

Sorry, something went wrong.

Uh oh!

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

All reactions

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Nov 28, 2017

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.

We use $Content later. So I will keep it as is.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread test/csharp/test_MshSnapinInfo.cs Outdated

@JamesWTruher James Truher (JamesWTruher) Nov 28, 2017

Copy link
Copy Markdown
Collaborator

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.

does this need a Skip.IfNot(Platform.IsWindows)?

Sorry, something went wrong.

Uh oh!

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

All reactions

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Nov 28, 2017

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.

Added

Sorry, something went wrong.

Uh oh!

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

All reactions
JamesWTruher
James Truher (JamesWTruher) approved these changes Nov 28, 2017
View reviewed changes
daxian-dbw
Dongbo Wang (daxian-dbw) approved these changes Nov 30, 2017
View reviewed changes

@daxian-dbw Dongbo Wang (daxian-dbw) left a comment

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.

Leave some comments

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread build.psm1 Outdated

@daxian-dbw Dongbo Wang (daxian-dbw) Nov 30, 2017

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.

maybe the single quote is not needed ...

Sorry, something went wrong.

Uh oh!

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

All reactions

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Nov 30, 2017

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.

Fixed.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread build.psm1 Outdated

@daxian-dbw Dongbo Wang (daxian-dbw) Nov 30, 2017

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.

maybe move this line closer to its uses.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread test/csharp/csharp.tests.csproj Outdated

@daxian-dbw Dongbo Wang (daxian-dbw) Nov 30, 2017

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.

Maybe not needed as it's already included in Tests.Common.props.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread test/csharp/csharp.tests.csproj Outdated

@daxian-dbw Dongbo Wang (daxian-dbw) Nov 30, 2017

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.

It's not just Linux now.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread test/csharp/csharp.tests.csproj Outdated

@daxian-dbw Dongbo Wang (daxian-dbw) Nov 30, 2017

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.

Please add a comment here

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread tools/appveyor.psm1 Outdated

@daxian-dbw Dongbo Wang (daxian-dbw) Nov 30, 2017

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.

it will write a true or false in console, should be suppressed.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread tools/travis.ps1 Outdated

@daxian-dbw Dongbo Wang (daxian-dbw) Nov 30, 2017

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.

nit: the ending quote is not needed.

Sorry, something went wrong.

Uh oh!

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

All reactions
@adityapatwardhan

Aditya Patwardhan (adityapatwardhan) commented Nov 30, 2017

Copy link
Copy Markdown
Member

Dongbo Wang (@daxian-dbw) All comments have been addressed and all tests have passed.

All reactions

Sorry, something went wrong.

Uh oh!

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

@adityapatwardhan

Aditya Patwardhan (adityapatwardhan) commented Nov 30, 2017

Copy link
Copy Markdown
Member

Dongbo Wang (@daxian-dbw) is this ready to merge?

All reactions

Sorry, something went wrong.

Uh oh!

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

Aditya Patwardhan (adityapatwardhan) added 5 commits November 30, 2017 14:15
@adityapatwardhan
Initial work to enable xunit
473a39c
@adityapatwardhan
Moved AssemblyOriginatorKeyFile to csharp.tests.csproj
73ac2ca
@adityapatwardhan
Native binary has dylib extension on macOS
111b68d
@adityapatwardhan
Addressed CR comments
15f68e9
@adityapatwardhan
Addressed CR comments
d7b7433
@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) force-pushed the xunitTest branch from faa4ee7 to d7b7433 Compare November 30, 2017 22:16
@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) merged commit 52df947 into PowerShell:master Nov 30, 2017
@TravisEz13 Travis Plunk (TravisEz13) modified the milestone: 6.0.0-GA Dec 1, 2017
@daxian-dbw Dongbo Wang (daxian-dbw) mentioned this pull request Dec 1, 2017
Enable xUnit tests on OS X #851
Closed
@TravisEz13 Travis Plunk (TravisEz13) added this to the 6.0.0-RC.2 milestone Dec 2, 2017
Travis Plunk (TravisEz13) pushed a commit to TravisEz13/PowerShell that referenced this pull request Dec 2, 2017
@chunqingchen @TravisEz13
Fix xunnit test for PS (PowerShell#4780)
1ed5e7f
* Initial work to enable xunit

* Moved AssemblyOriginatorKeyFile to csharp.tests.csproj

* Native binary has dylib extension on macOS
@TravisEz13 Travis Plunk (TravisEz13) mentioned this pull request Dec 2, 2017
Merge 6.0.0 rc.2 changes #5606
Merged
Travis Plunk (TravisEz13) pushed a commit that referenced this pull request Dec 2, 2017
@chunqingchen @TravisEz13
Fix xunnit test for PS (#4780)
22abe98
* Initial work to enable xunit

* Moved AssemblyOriginatorKeyFile to csharp.tests.csproj

* Native binary has dylib extension on macOS
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@chunqingchen @adityapatwardhan
Fix xunnit test for PS (PowerShell#4780)
4fc1eef
* Initial work to enable xunit

* Moved AssemblyOriginatorKeyFile to csharp.tests.csproj

* Native binary has dylib extension on macOS
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@chunqingchen @TravisEz13
Fix xunnit test for PS (PowerShell#4780)
694213f
* Initial work to enable xunit

* Moved AssemblyOriginatorKeyFile to csharp.tests.csproj

* Native binary has dylib extension on macOS
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
@daxian-dbw Dongbo Wang (daxian-dbw) daxian-dbw approved these changes
@TravisEz13 Travis Plunk (TravisEz13) Awaiting requested review from TravisEz13
@SteveL-MSFT Steve Lee (SteveL-MSFT) Awaiting requested review from SteveL-MSFT
@anmenaga Andrew (anmenaga) Awaiting requested review from anmenaga
+2 more reviewers
@markekraus Mark Kraus (markekraus) markekraus left review comments
@JamesWTruher James Truher (JamesWTruher) JamesWTruher approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

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

Assignees

@daxian-dbw Dongbo Wang (daxian-dbw)

Labels

None yet

Projects

None yet

Milestone

6.0.0-RC.2

Development

Successfully merging this pull request may close these issues.

Enable xUnit tests on Windows

Uh oh!

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

8 participants

@chunqingchen @TravisEz13 @adityapatwardhan @daxian-dbw @markekraus @JamesWTruher @msftclas @msftgits
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.