Open iSeiryu opened 9 months ago
I tried resetting all LF
files to CRLF
via updating git config to use CRLF
and then running these commands:
git rm -rf --cached .
git reset --hard HEAD
Some tests started passing when I run them via VS2022. But when I run .\Test.cmd -testCoreClr
it still gives me a lot of errors.
Test execution time: 00:16:36.2049844
Test failures encountered
Command failed to execute with exit code 1: C:\Program Files\dotnet\dotnet.exe C:\Users\me\work\repos\github\roslyn\artifacts\bin\RunTests\Debug\net7.0\RunTests.dll --dotnet "C:\Program Files\dotnet\dotnet.exe" --logs "C:\Users\me\work\repos\github\roslyn\artifacts\log\Debug" --configuration Debug --tfm net6.0 --tfm net7.0 --tfm net8.0 --timeout 90 --tfm net6.0-windows --include '\.UnitTests' --html --arch x64
I'm seeing the same kinds of issues with every pull I've done so far.
Running on Windows with git defaults (core.autocrlf = true) gives me a small number of error cases, all of which appear to be CRLF based. For example:
Source: SuppressionTests.vb line 907
Duration: 16 ms
Message:
Actual and expected values differ. Expected shown in baseline of diff:
<LF>
-Imports System<LF>
-<LF>#Disable Warning ErrorDiagnostic ' ErrorDiagnostic<LF>
-Class C<LF>
-#Enable Warning ErrorDiagnostic ' ErrorDiagnostic<LF>
+Imports System<CR><LF>
+<CR><LF>
+#Disable Warning ErrorDiagnostic ' ErrorDiagnostic<CR><LF>
+Class C<CR><LF>
+#Enable Warning ErrorDiagnostic ' ErrorDiagnostic<CR><LF>
Sub Method()<LF>
End Sub<LF>
End Class
Expected: True Actual: False
When I've tried using the DevContainer from a Windows box, I'm getting a large number of failures regardless of whether I set core.autocrlf to "true" or "false".
Version Used: Latest commit on
main
https://github.com/dotnet/roslyn/pull/71257 Steps to Reproduce:git config --global -e
.\Test.cmd
. After 35+ minutes observe a lot of failed testsExpected Behavior: All tests should pass. Actual Behavior: It gave me a lot of reports named like
/TestResults/Debug/WorkItem_8_x64_test_results.html
with 70-99 Pass percentage. No report with 100%.Some error examples:
At least some of those failures relate to
CRLF
vsLF
because tests like theseresult in
LF
endings in all repo files andCRLF
in all files outside of the repo.We switched all of our work repos to
LF
even on Windows. There are some downsides and 0 benefits to keep them asCRLF
. Maybe these test files likefile1.cs
can be created in a temp folder within the roslyn repo itself? The folder can be added to.gitignore
or removed after the tests ran.