-
Notifications
You must be signed in to change notification settings - Fork 831
Added fsx evaluation/running to new testing framework. #10106
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
Conversation
…onSession.EvalInteractionNonThrowing
|
|
||
| function TestUsingXUnit([string] $testProject, [string] $targetFramework, [string]$testadapterpath) { | ||
| TestUsingMsBuild -testProject $testProject -targetFramework $targetFramework -testadapterpath $testadapterpath -noTestFilter $false | ||
| TestUsingMsBuild -testProject $testProject -targetFramework $targetFramework -testadapterpath $testadapterpath -noTestFilter $true |
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 shouldn't add tests filters, since xUnit doesn't understand it.
|
Ugh, macOS timeouts strike again. Will re-queue. |
TIHan
left a comment
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.
Looks good!
KevinRansom
left a comment
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 like it, thanks for this.
Kevin
|
mmmmmm yeah that lovely macos timeout, yeeeehaw |
* Added fsx evaluation via the FSharpScript.Eval as well as FsiEvaluationSession.EvalInteractionNonThrowing * Turn off test filter for XUnit, and add to NUnit
F# scripts can be evaluated via
New framework function
eval, takesCompilationUnit, returns result of evaluation (usesFSharpScript.Evalunder the hood) - returns result of evaluation + diagnostics + FsiValue, which can be examined (for now, only 2 functions were added, for checking type and value,withEvalTypeEqualsandwithEvalValueEqualsrespectively. More can be added later as needed.)New framework function
runFsi, takesCompilationUnit, returns result of evaluation (usesFsiEvaluationSession.EvalInteractionNonThrowingunder the hood) - will just run the script and return the result + output. Does not return FSharpErrorInfo, so need to check STDERR explicitly viawithStdErrContains. Basically, a wrapper around CompilerAssert'sRunScriptWithOptions.Addresses #9836