-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Test case uses locale-dependent output #137116
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
Comments
If that's the only test that fails then I think we don't normally rely on locale? It may just be this test needs tweaking. EDIT: wait that's not a linker erorr, huh. Ignore this next bit. linker stuff
We do configure Rust to use English for the linker rust/compiler/rustc_codegen_ssa/src/back/linker.rs Lines 30 to 41 in c3fe9e7
However it relies on the English language pack being installed via the Visual Studio Installer. |
Currently the std::io::Error's debug output relies on winapi unsafe {
SetThreadUILanguage(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US));
} If above code is called from rustc, i think the output will be deterministic. |
I think that would need to be an option exposed by libtest. It manages running test threads. |
This error comes from rustc, not a libtest thread. rustc itself would need to set its language to english for this |
In which case we could set it in rustc main (early, before anything can error) but I think that would need a Major Change Proposal (MCP). |
This is a general problem where the test infra doesn't try to account for locale (because I don't think the test infra can really properly account for this (e.g. snapshot tests) without setting the locale for rustc somehow. |
I was running ui-tests, and this test case fail on my windows machine:
Maybe we should not rely on such locale-dependent output, or maybe we could configure Rust standard library/compiler to use English as UI language.
The text was updated successfully, but these errors were encountered: