-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[tests] Skip XslCompiledTransformApi tests on iOS, tvOS, and when testing native AOT #75730
[tests] Skip XslCompiledTransformApi tests on iOS, tvOS, and when testing native AOT #75730
Conversation
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. |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
<ItemGroup Condition="(('$(TargetOS)' != 'tvOS' and '$(TargetOS)' != 'iOS') or '$(RunDisablediOSTests)' == 'true') and | ||
('$(TestNativeAot)' != 'true' or '$(RunDisabledNativeAotTests)' == '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.
It might be better to put [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
on the individual test classes in these files. It's more consistent with how we do things and more futureproof.
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
LGTM if it fixes the problem.
It fixes half of the problem. Other half of the NativeAOT tests still fail and need similar treatment. |
This PR was initially only targeting XslCompiledTransformApi tests, so I didn't have a look at all the other test suites that were removed and where the respective TestExclusions weren't honored, but I'll look at the failing XmlSerializerTests tests. Would it make sense to make PRs on a test suite by test suite basis, or trying to tackle them all in this one PR? |
I don't know what triggered it but my totally unrelated PR started seeing the same errors on the NativeAOT pipelines. In fact I started getting them locally for the Btw, you should run the extras pipelines ( |
The test projects (mentioned in the diffs to src/libraries/tests.proj in this PR) got deleted and folded into another project that is not excluded. So tests we weren't even compiling before started failing. |
Ah, that explains it. I can understand that it was missed as part of a PR if the extras pipelines were not run but I am quite surprised that there was no issue filed for it based on the rolling builds. |
Missed that one (or rather it was not filed yet when I first hit the issue). Thanks. |
00e9588
to
966cfea
Compare
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
I looked at the test failures more closely, and it doesn't look obviously System.Reflection.Emit to me. I looked at the comment in tests.proj and it looks like System.XmlSerializer is just not supported on NativeAOT right now. I also noticed some test failures in two more suites that were removed
|
It's a bit misleading but if you look closely at the stack trace the inner exception is still |
Tests fail from trimming and MakeGeneric, and XmlSerializer is not supported with NativeAOT
966cfea
to
103d596
Compare
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
This is not fixing the whole problem, but it is still an improvement. Merging. |
Actually, I do not think that the condition on the Schema and XmlSerializer test is right (it should not be ReflectionEmit). The Xslt one is good, so let's merge that one at least. |
Fixes #75699
In effort to consolidate System.Private.Xml Test projects, the test suite exclusions within https://github.com/dotnet/runtime/blob/main/src/libraries/tests.proj weren't being honored because the suites no longer existed.
Instead, to skip the tests,
[ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
is being added at the class level to skip tests where Reflection Emit is needed.This PR skips tests within XslCompiledTransformAp and XmlSerializerTests