ionide / ionide-vscode-fsharp

VS Code plugin for F# development
http://ionide.io
MIT License
850 stars 276 forks source link

Fix test explorer zsh #1940

Closed TheAngryByrd closed 9 months ago

TheAngryByrd commented 9 months ago

WHAT

🤖 Generated by Copilot at 4556279

This pull request improves the test explorer functionality by fixing a test filter bug, adding error handling and logging, and changing the dotnet test usage in TestExplorer.fs.

🤖 Generated by Copilot at 4556279

Oh we're the crew of the dotnet test We filter and log with the best We fix the bugs and we handle the errors We heave away on the dotnetTest

🐛🚧🛠️

WHY

I couldn't get the single tests to run on zsh. I wasn't getting anything useful out of the message Test run exitCode.

I took what what it was running and got this output:

 dotnet test "/workspaces/IcedTasks/tests/IcedTasks.Tests/IcedTasks.Tests.fsproj" --framework:"net7.0" --logger:"trx;LogFileName=/home/vscode/.vscode-server/data/User/workspaceStorage/cb18f208f0b841c60c9d3407677860ba/Ionide.Ionide-fsharp/TestResults/tests/IcedTasks.Tests/IcedTasks.Tests.trx" --noLogo --no-build --filter (FullyQualifiedName=IcedTasks.CancellableTask.CancellableTaskBuilder.Return.Simple Return)
zsh: unknown username ''

Turns out we need to quote the filter expression.

Future things:

HOW

🤖 Generated by Copilot at 4556279

TheAngryByrd commented 9 months ago

cc @farlee2121

farlee2121 commented 9 months ago

Makes sense to me.

I'd hoped that appending the process output to the test console would help with diagnosing most problems, but there are some issues that still don't return useful information. That's part of why I output the test command to the F# - Test Adapter output channel.