-
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
[libraries] Move library tests Feature Switches defaults to Functional tests #53253
[libraries] Move library tests Feature Switches defaults to Functional tests #53253
Conversation
Tagging subscribers to this area: @Anipik, @safern, @ViktorHofer Issue Details
|
Why only for Android and not for iOS? Is there some background on why it was used for tests in the first place? |
We wanted standard defaults for the functional tests and I think it got mixed with the libraries tests. Fair point re: iOS. I agree. |
This should be added to the PR description too. |
LGTM |
cc @akoeplinger |
No. Same for iOS. |
The default switches properties are set to false in the scope of runtime/eng/testing/linker/SupportFiles/Directory.Build.props Lines 4 to 6 in 84b7c67
@MaximLipnin I'm not exactly sure why they're needed, do you know in more detail? I'll move the Browser wasm equivalent from |
You can also drop the 3 properties from |
.. and move them to the functional tests csproj! |
Ah right! Totally missed that, thanks :) |
I added ios/android props analogously to the browser one. If it's not necessary now we could remove them. |
…raries with EnableAggressiveTrimming
I think I discovered the series of events that led to the properties as of current, and updated the PR description. Can I get another 👀 over if it makes sense? @filipnavara @radical @MaximLipnin |
Awesome! Thank you for getting that whole history figured out 👍 |
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.
This does explicitly set some new properties, for the wasm case, which might be fine. Let's wait to see how the builds go.
Thanks for putting together the links. It really helps to show the context! For reference, here are the defaults on the Xamarin.Mac/iOS side since the Xamarin.Android ones are already linked in the description: I'm still somewhat torn on what is the intended setup. On one hand keeping some of the switches "on" may reduce the size of the packages that are produced and transferred to Helix and in turn save some time and bandwidth. It also more closely mirrors the defaults that customer will get when targeting I'd certainly value some other opinion on what do we really want to test here since there's no clear answer to that. Is the intent for functional tests to mirror the options customers get? Are the unit tests intentionally run in an environment that is unified across platforms but not matching the defaults customers get? Are there actually some tests specifically for these options and whether they are honoured properly? |
The intent of the functional tests are to closely mirror what our customers will get w/ xamarin android and ios. I had forgotten we originally brought these defaults up for our wasm AOT testing efforts (where a smaller app really matters). As for the libraries tests, the problem with applying centralized defaults in tests.mobile.targets is that there are no opportunities for the test project to override them. Also, I would rather not try to deviate from having the test project be in control of its own configuration. |
I started to introduce a mechanism to override them on per-test-project basis by adding the same I am fine with keeping the defaults different for functional tests (that finally run as part of CI) and the unit tests since it makes some things easier. Just wanted to point out that there are some downsides to it too. That leaves the last question, is there a test coverage somewhere (dotnet/sdk? linker?) specifically for testing the options themselves? For example, I would expect tests that explicily expect 1) disabled UTF-7 encoding 2) exception messages having the resource key instead of localized string 3) disabled binary serialization. |
…defaults for enable aggressive trimming
…ts to Functional tests
Thanks for the input!
Because of this, I decided to add the Xamarin Android, Xamarin Mac/iOS, and Wasm feature defaults into the Functional tests project properties.
''" attribute to each of the options as there is in the workloads/SDKs. |
The failing lanes seem to be unrelated. |
…asm_debugger_and_use_debugger_agent * upstream/main: (597 commits) Fix42292 (dotnet#52463) [mono] Remove some obsolete emscripten flags. (dotnet#53486) Fixed path to projects (dotnet#53435) support ServerCertificateContext in quic (dotnet#53175) Socket: delete unix local endpoint filename on Close (dotnet#52103) [mono] Fix sgen_gc_info.memory_load_bytes (dotnet#53364) Refactor MsQuic's native IP address types. (dotnet#53461) Re-enabled optimizations for gtFoldExprConst (dotnet#53347) Add diagnostic support into sample app and AppBuilders on Mono. (dotnet#53361) Fix issues with virtuals and mdarrays (dotnet#53400) Split Variant marshalling tests (dotnet#53035) Update clrjit.natvis to cover GT_SIMD and GT_HWINTRINSIC (dotnet#53470) remove WSL checks in tests (dotnet#53475) Always spawn message loop thread for SystemEvents (dotnet#53467) add AcceptAsync cancellation overloads (dotnet#53340) Remove unnecessary reference to iOS workload pack in the Mono workload (dotnet#53425) Add CookieContainer.GetAllCookies (dotnet#53441) Remove DynamicallyAccessedMembers on JsonSerializer (dotnet#53235) [wasm] Re-enable Wasm.Build.Tests (dotnet#53433) [libraries] Move library tests Feature Switches defaults to Functional tests (dotnet#53253) ...
Fixes #52645
In the work to reduce library testing infrastructure size,
EnableAggressiveTrimming
had been added in addition to a few properties from https://docs.microsoft.com/en-us/dotnet/core/deploying/trimming-options#trimming-framework-library-features.These properties were not conditioned under
EnableAggressiveTrimming
or made library testing specific, so they probably attributed to #48027, which had been resolved by #48429 usingDefaultBlazorWASMFeatureSwitches
.In the work to move WASM AOT test building to helix, some of the properties were modified #48226, probably to get tests buliding and passing.
In a similar vein, Xamarin Android had set switch defaults for runtime libraries also to reduce size dotnet/android#5337, and this work had been extended to
dotnet/runtime
via#49005 and #49635 because it was thought that because Browser wasm had them in
tests.wasm.targets
that they would be needed for Android and iOS.Taking the above events into account, the properties were originally intended to reduce library testing size when trimming (so when
EnableAggressiveTrimming=true
) but weren't conditioned as such, and led to the other events.This PR looks to:
Remove ActiveIssue 52645 attributes
Set the trimming framework features properties directly in the Functional tests project properties and model them after Xamarin Android, Xamarin Mac/iOS, and WASM
Set the trimming framework features properties in tests.mobile.targets to the values previously found in tests.wasm.targets
Remove
UseDefault*FeatureSwitches