Skip to content
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

Fix locale test for older OSes #1240

Merged
merged 1 commit into from Aug 28, 2020

Conversation

StephanTLavavej
Copy link
Member

After merging #1168, Dev11_0836436_get_time began failing in our Microsoft-internal test harness, but only for individual developer test runs (instead of PR/CI test runs, which is how this got through checkin validation). We tracked it down to variation in the OS versions of our test machines. This GitHub repo uses an Azure Virtual Machine Scale Set with Windows Server 2019 Datacenter:

$WindowsServerSku = '2019-Datacenter'

However, some of our internal test machines use Windows Server 2016, which doesn't support UTF-8 locales. Because this test uses only wide strings, we don't actually care about the locale's codepage for narrow strings, so the fix is to remove ".utf-8". Additionally, we were spelling the Russian locale as "ru_RU" and the German locale as "de_DE". There appears to be OS variation here too - the older OS doesn't like the underscores. Spelling the locales with dashes, as we were already doing for "zh-CN", allows the test to pass.

There are no other changes besides clang-format rewrapping.

@StephanTLavavej StephanTLavavej added the test Related to test code label Aug 28, 2020
@StephanTLavavej StephanTLavavej requested a review from a team as a code owner August 28, 2020 01:30
@StephanTLavavej StephanTLavavej added this to Initial Review in Code Reviews via automation Aug 28, 2020
Copy link
Member

@CaseyCarter CaseyCarter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for picking this up! I knew enough to run it to ground, but not to smoke it out.

@StephanTLavavej
Copy link
Member Author

No problem - locales are a notorious weak point for me, so I learned a little while investigating this.

@StephanTLavavej StephanTLavavej moved this from Initial Review to Ready To Merge in Code Reviews Aug 28, 2020
@StephanTLavavej StephanTLavavej merged commit b90b3e0 into microsoft:master Aug 28, 2020
Code Reviews automation moved this from Ready To Merge to Done Aug 28, 2020
@StephanTLavavej StephanTLavavej deleted the locales branch August 28, 2020 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Related to test code
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants