-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Call PlatformDetection checks manually in IL tests #121196
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
|
Tagging subscribers to this area: @hoyosjs |
|
I do not think we want to be inlining the checks like this into IL tests. We want to have a consistent approach to mark the tests with XUnit metadata. What makes the IL tests different from C# tests in this regard? Can we fix the standalone mode to make that work instead of this? |
|
Ok, I see we have done that in #112399 . I think it is broken approach. I would like to see that PR reverted. |
jkoritzinsky
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.
If possible, I'd rather we move each test out of the Main method and duplicate the conditional check in Main (for standalone) and the attribute (for the merged runner). It provides a better experience for our test runs.
Duplication will mean that the checks are mismatched all the time. |
|
Okay we can revert it. The guidance for writing IL tests should be updated to specify to never use the conditional attributes, at least for the cases where our partners that use BuildAllTestsAsStandalone work (Linux, no stress modes). |
|
It's unclear what is to be done for this PR. Remove |
|
|
We could hook something up with the ILTestRunner project to have it provide the Main method for each IL test, but only in BuildAllTestsAsStandalone. That way we could use the conditional attributes in IL and reuse our generator to provide the entry point with the basic filtering. |
OK, I didn't realize it was part of a larger work in progress. I was building with cc @clamp03, I know you're using |
Regression after #119878, these tests were entered with
BuildAllTestsAsStandalonedespiteConditionalFacts. See #112399 (comment) for context.