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 System.Runtime tests for single file runner #50996

Merged
merged 2 commits into from
Apr 19, 2021

Conversation

MichalStrehovsky
Copy link
Member

Allows us to test the documented single file behaviors.

Not adding a new PlatformDetection thing for this since we don't really have a way to detect single file that wouldn't end us up testing a tautology.

Allows us to test the documented single file behaviors.

Not adding a new `PlatformDetection` thing for this since we don't really have a way to detect single file that wouldn't end us up testing a tautology.
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

Copy link
Member

@agocke agocke left a comment

Choose a reason for hiding this comment

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

LGTM

string name;
try
{
name = Module.FullyQualifiedName;
Copy link
Member

Choose a reason for hiding this comment

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

I think this should always return <Unknown> now, FWIW

@jkotas
Copy link
Member

jkotas commented Apr 20, 2021

this since we don't really have a way to detect single file that wouldn't end us up testing a tautology.

Can the single file test driver set something in the AppContext and the dynamic checks then biggy back on it?

I think building different test assemblies for single file testing is just going to cause pain.

@MichalStrehovsky
Copy link
Member Author

I think building different test assemblies for single file testing is just going to cause pain.

Yeah, but this is what we're doing because the xunit runner won't work for single file.

If we ever bite the bullet and delete all of xunit except for the custom attributes as Assert.* methods (replacing the rest with a source generator that constructs a set of delegates to test methods and runs them), this will have to change.

If it starts looking like we'll need this detection in other tests, I'll redo this to use AppContext.

@karelz karelz added this to the 6.0.0 milestone May 20, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants