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

dotnet vstest does not detect tests when running under a non-US locale #2853

Closed
mark-raymond opened this issue Apr 14, 2021 · 4 comments
Closed
Assignees

Comments

@mark-raymond
Copy link

mark-raymond commented Apr 14, 2021

Description

dotnet vstest does not detect tests when running under a non-US locale. The is a problem that is present in Microsoft.NET.Test.Sdk 16.9.1 and 16.9.4, but was not present in 16.8.3.

Steps to reproduce

  • Clone mark-raymond/dotnet-test-locale-test
  • Run ./test.sh en_US to see the test runner successfully run using the en_US locale
  • Run ./test.sh <some other locale> to see the test runner fail to find tests. At time of writing, I have tried en_GB, en_CA, and fr_FR, and all fail to find tests.

Expected behavior

Microsoft (R) Test Execution Command Line Tool Version 16.9.4
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.

Passed!  - Failed:     0, Passed:     1, Skipped:     0, Total:     1, Duration: 8 ms - /app/dotnet-test-locale-test.dll (net5.0)

Actual behavior

Microsoft (R) Test Execution Command Line Tool Version 16.9.4
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
No test is available in /app/dotnet-test-locale-test.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.

Additionally, path to test adapters can be specified using /TestAdapterPath command. Example  /TestAdapterPath:<pathToCustomAdapters>.

Diagnostic logs

en_GB.host.21-04-14_13-32-40_29866_4.log
en_GB.log
en_US.host.21-04-14_13-32-32_85293_4.log
en_US.log

Environment

Originally noticed on an Ubuntu 18.04 build agent, and reproduced in an Ubuntu 20.04 Docker container.

AB#1314786

@mark-raymond
Copy link
Author

I've now bisected the NuGet preview releases, and this bug was introduced between 16.9.0-preview-20201020-06 and 16.9.0-preview-20201123-03.

@nohwnd
Copy link
Member

nohwnd commented Apr 19, 2021

Thank you for this repro. We are looking into it.

@Haplois
Copy link
Contributor

Haplois commented Apr 19, 2021

This workaround can be used to fix this issue temporarily. We are looking into this issue.

@Haplois Haplois added the bug label Apr 19, 2021
@Haplois Haplois self-assigned this Apr 20, 2021
@pavelhorak pavelhorak added this to the 16.10 milestone Apr 20, 2021
Haplois added a commit that referenced this issue Apr 21, 2021
Haplois added a commit to Haplois/vstest that referenced this issue Apr 21, 2021
Haplois added a commit that referenced this issue Apr 21, 2021
@Haplois
Copy link
Contributor

Haplois commented Apr 21, 2021

This is fixed in #2860, and the fix is released on v16.10.0-release-20210421-08 on our daily feeds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants