-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Enable the task unit test projects in helix and apply fixes to them. #33184
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
Enable the task unit test projects in helix and apply fixes to them. #33184
Conversation
|
@sbomer I'm trying to enable these unit tests we haven't had running in a while and they include a test that requires certain naming conventions for various messages. in particular, message either need an error number or need to end in _Info. I tried to update ILLinkOptimizedAssemblies and ILLinkRunning but it turns out those are consumed by the ILLink.targets that aren't in this repo. What is the path forward here? Do I need to limit this change to main and make an update in the dotnet/linker repo first? Are there tests in the linker repo that will fail if I do? I also noticed that there's a copy of the linker targets in the runtime repo. Does that also need to be modified or does that get updated automatically through codeflow? |
|
The linker targets have been moving around in the last few releases.
We moved the targets out of the SDK in dotnet/linker#2837 - we thought the testing situation was an ok compromise, but at the time I didn't catch the dependency on the SDK resource strings. The targets initially lived in the SDK exactly because SDK already had test infra and localization for targets. Other targets that live in runtime also are not localized, and are tested in SDK. I'd like to find a better long-term path for the localization, and remove the cross-repo dependency on SDK's resource strings. But for now, to make the change in main, you'd need to update the reference in dotnet/runtime first, and to make it for 7.0 you'd need to update it in dotnet/linker first. AFAIK we don't have tests in linker or runtime that will fail if you do. |
|
I filed dotnet/runtime#87435 about finding a better solution to this. |
|
Thanks for the summary. I think for simplicity, I may just enable the unit test project in main and only fix the strings in runtime (instead of trying to change things in 7.0 as well). If I make a change in runtime to change the ID, will it break tests in runtime that rely on the string resources that live here? I'm not ready yet to enable the unit test project (still working through infrastructure issues) and I could potentially disable this one test for now (and revert the string changes in this PR) but it'd be good to figure out how we would update that in the future. Would it be something where we'd have to have both the old and new string id, update the SDK version in runtime, then change runtime, then remove the old strings here (ie do a staged change)? |
…accept it on the command line. TestContext.cs will prioritize the command line first and then the environment variable. Fix a test.
…t' into marcpopMSFT-enableunittestproject
|
I'm not aware of any runtime tests that rely on the string resource IDs (or their values). As far as I know, runtime's usage of the linker is either via custom targets (that don't use these resources), or the LKG SDK. So I think it would work to update the targets in runtime to use non-existent IDs, and then create the IDs when the change flows into SDK. If I'm wrong about that, then I think the staged change approach you described would work. I would try changing the IDs in runtime, and if nothing fails in ci it should be fine. We'll just want to make the update quickly in SDK to avoid blocking dependency flow for long. |
|
I talked to Daniel and we decided it probably wasn't worth a bunch of effort to just unwind the two linker resources for a test (as there's no functional justification for that afaik). Instead, I'll add an exception to the test for now and revert those. We can decide to change the linker ones in the future if we decide it's a problem. |
…gic that finds the assets on helix
Add DOTNET_SDK_TEST_MSBUILDSDKRESOLVER_FOLDER to the setup script
Save the test assets directory even if it doesn't exist so I can try to figure out where it should be
…T-enableunittestproject
Account for 1206 Account for different path separator on non-windows Disable a set of tests on non-windows as the PackageDependenciesDesignTime ends up returning null (need to discuss this with Daniel)
Add 1207 to the known error list
|
@dsplaisted, finally got it to pass checks. The most interesting of my changes are the inclusion of assets in the helix payload, setting a flag for that and the disabling of some tests on non-windows, and my reverting of the lock files (which may end up triggering CG which can be dismissed). I think the rest of the changes are pretty straightforward. Happy to walk you through it. |
To enable this required a variety of changes: