Skip to content

Updates to our IOperation testing#26862

Merged
jaredpar merged 4 commits intodotnet:masterfrom
jaredpar:fix-optest
May 15, 2018
Merged

Updates to our IOperation testing#26862
jaredpar merged 4 commits intodotnet:masterfrom
jaredpar:fix-optest

Conversation

@jaredpar
Copy link
Copy Markdown
Member

The IOperation verification includes running an extra validation walker over our trees for virtually every compilation done in our unit tests. This validation is not suitable for every test, due to the computations needed, and hence is disabled where necessary.

Previously this ran via a conditional compilation approach. This made testing IOperation a bit awkward. Had to first do a recompile and then run a test. This PR changes the IOperation leg to instead look for an environment variable: %ROSLYN_TEST_IOPERATION%.

I was a bit leery about using an environment variable here. But there really isn't any other supported mechanism for feeding options to tests via xunit. Other tests in our system have decided to use environment variables as well hence this isn't adding a new mechanism, rather unifying our tests.

This won't yet move the IOperation testing into our normal PR flow. Want to get our Spanish tests stable first before we add another leg into the mix.

Note: these changes have all already gone through full review. This is just merging features/optest into master.

jaredpar and others added 4 commits May 15, 2018 07:56
No longer require conditional compilation in order to run the full
IOperation test suite.
Keeping this offline for now until we get to the root of the Spanish
machine issues.
@jaredpar
Copy link
Copy Markdown
Member Author

FYI @dotnet/roslyn-compiler

{
public BaseTupleBinaryOperatorExpression(BinaryOperatorKind operatorKind, SemanticModel semanticModel, SyntaxNode syntax, ITypeSymbol type, Optional<object> constantValue, bool isImplicit)
: base(OperationKind.BinaryOperator, semanticModel, syntax, type, constantValue, isImplicit)
: base(OperationKind.TupleBinaryOperator, semanticModel, syntax, type, constantValue, isImplicit)
Copy link
Copy Markdown
Member

@333fred 333fred May 15, 2018

Choose a reason for hiding this comment

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

Seems like an unrelated bug fix, can we break it out into a separate change? #Closed

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah, nevermind, I see that these were in a separate commit. To satisfy my curiosity, why were these bug fixes made in a separate branch, and not in master directly?


In reply to: 188370704 [](ancestors = 188370704)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I actually thought they'd take longer and be more disruptive. Hence we did them in a branch instead. Turns out it was much easier than I thought based on the number of failures we started with.

{
// Bind the expression for error recovery, but discard all new diagnostics
iterationErrorExpression = BindExpression(node.Variable, new DiagnosticBag());
if (iterationErrorExpression.Kind == BoundKind.DiscardExpression)
Copy link
Copy Markdown
Member

@333fred 333fred May 15, 2018

Choose a reason for hiding this comment

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

Seems unrelated? #Closed

Diagnostic(ErrorCode.ERR_MustDeclareForeachIteration, "_").WithLocation(6, 18)
);

var tree = comp.SyntaxTrees.Single();
Copy link
Copy Markdown
Member

@333fred 333fred May 15, 2018

Choose a reason for hiding this comment

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

Seems unrelated? #Closed

Copy link
Copy Markdown
Contributor

@AlekseyTs AlekseyTs left a comment

Choose a reason for hiding this comment

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

LGTM (iteration 4)

@jaredpar jaredpar merged commit 87232eb into dotnet:master May 15, 2018
@jaredpar jaredpar deleted the fix-optest branch August 21, 2018 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants