Add PSxUnit runner#2574
Add PSxUnit runner#2574chunqingchen wants to merge 5 commits intoPowerShell:masterPowerShell/PowerShell:masterfrom chunqingchen:masterCopy head branch name to clipboard
Conversation
chunqingchen
commented
Nov 1, 2016
- We need a runner that runs across platforms and compatible with .net core
- Some of the code are from dotnet-test-xunit as it supports .net core and is a xunit runner, I modify the file to compatible running PS tests and add classification
|
Hi @chunqingchen, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! TTYL, MSBOT; |
daxian-dbw
left a comment
There was a problem hiding this comment.
Hi @chunqingchen, there are a few issues with your PR:
- You need to sign the CLA agreement
- Your first 2 commits show changes that are already merged: 0908547. And your third commit is a merge commit. Please rebase your working branch and push again.
- Please fix the Travis CI failure.
|
@chunqingchen you need to join the Microsoft GitHub org |
|
@daxian-dbw |
There was a problem hiding this comment.
assemblyFilename [](start = 50, length = 16)
Check for null or empty string.
There was a problem hiding this comment.
The same Path.Combine() is done twice. It should be something like:
var runnerJson = Path.Combine(pathWithAssemblyName, $"{assemblyName}.xunit.runner.json")
if(File.Exists(runnerJson)
{
return File.OpenRead(runnerJson);
}
There was a problem hiding this comment.
File.OpenRead [](start = 27, length = 13)
This can throw exceptions. We should catch and fail gracefully.
There was a problem hiding this comment.
corrected. Although I don't try to catch most of the exceptions and want to throw them as they are
There was a problem hiding this comment.
Add ///
There was a problem hiding this comment.
//Console.ReadKey(); [](start = 12, length = 20)
Remove unnecessary commented lines.
There was a problem hiding this comment.
Maybe this can be moved before the block which checks for "Skip". So if the testcase does not match the filter then we dont need to check if it is skipped.
There was a problem hiding this comment.
(".\result.xml" [](start = 44, length = 16)
Result file name should not be hardcoded but be accepted as a parameter.
There was a problem hiding this comment.
Mix use of tabs and spaces.
There was a problem hiding this comment.
Please break this into smaller functions. Some code might be reusable and it will become much more readable.
There was a problem hiding this comment.
this is actually from the dotnet-test-xunit project so i would just leave it as is
|
🕐 |
|
@adityapatwardhan the comments are resolved. |
|
@lzybkr Hi Jason, Aditya has approved the comments, can this be merged? |
|
Reassigned to @daxian-dbw - he'll want to look at this as part of moving to msbuild based dotnet cli. |
|
@daxian-dbw Hi Dongbo, Aditya has approved the comments, can this be merged? |
|
@chunqingchen Sorry that I didn't get a chance to quickly go through this PR. Will do it. |
|
@SteveL-MSFT This PR contains code from XUnit. I just want to double check, is there a concern about checking in third party source code to our repository? |
|
@daxian-dbw yes, we need to adhere to their licensing |
|
@chunqingchen it looks like we're just taking some of their code without modification? can we have this be a runtime dependency so that xunit is already available? |
|
I'm closing this PR for following 2 reasons:
|