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 test explorer zsh #1940

Merged
merged 1 commit into from
Oct 3, 2023
Merged

Conversation

TheAngryByrd
Copy link
Member

@TheAngryByrd TheAngryByrd commented Oct 2, 2023

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:

  • I still couldn't get any useful logs out of the stdout/stderr to dotnet test Process.execWithCancel. Not sure what we need to do here to make this better.
  • It seems we always assume the process doesn't fail. It used the last run which passed and showing incorrect.
    • we should probably delete the old trx before each test run
    • Maybe we should do the promise.reject here instead

HOW

🤖 Generated by Copilot at 4556279

  • Fix test filter expression bug and improve error reporting (link, link)

@TheAngryByrd
Copy link
Member Author

cc @farlee2121

@farlee2121
Copy link
Contributor

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.

@TheAngryByrd TheAngryByrd merged commit f8443ae into ionide:main Oct 3, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants