-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Merged test groups - check behavior when a test with incorrect settings is added to a merged directory #84182
Comments
Tagging subscribers to this area: @dotnet/runtime-infrastructure Issue DetailsThe main example here is that we remove the OutputType==Exe setting. What happens if a new test is added with this setting?
|
Tagging subscribers to this area: @hoyosjs Issue DetailsThe main example here is that we remove the OutputType==Exe setting. What happens if a new test is added with this setting?
|
Such tests appear to be built but not run during CI, etc. |
If I test is written in the old style (with a Main and OutputType==Exe without an attribute such as RequiresProcessIsolation) in a merged test group directory, it will be skipped. This change adds a check to detect those cases. I have struggled with ways to automatically set OutputType. Directory.Build.props is too early (the test project file will override it). Directory.Build.targets is too late as the C# targets files will already have been processed and set other variables based on the value of OutputType. This Target doesn't execute until later, but since it is an error it doesn't matter how those additional properties were set. Since this adds more boilerplate to each merged test directory, I created a src/tests/Directory.Merged.props to share all of that. This catches 3 tests that aren't currently executing. Unrelated: - Use GetPathOfFileAbove in nearby locations for Directory.Build.props chaining rather than specific paths - Fix two easy IL warnings that appeared in my local build of all tests Resolves #84182
This needs to be strengthened. I saw an incorrect test that made it past the check in #84284 though can't remember it at the moment. I plan an audit of new tests to see what's been happening and will see it then. |
The main example here is that we remove the OutputType==Exe setting. What happens if a new test is added with this setting?
The text was updated successfully, but these errors were encountered: