-
Notifications
You must be signed in to change notification settings - Fork 316
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
Reimplement the MSBuild VSTestTask task based on ToolTask #2437
Conversation
I don't seem to be able to execute the failling test on my computer (Visual Studio or CLI) and I fail to see how those are related to my changes. Please advise. |
Hmm that's a blocker IMHO. We want out colored output even when running from dotnet test. |
Would re-run the pipeline, but it has conflicts. I don't see how the failing test would be related to your changes either. |
There was no conflict 4 days ago... I'll try and fight my way through git to resolve this (I may learn 1 or 2 things along the way 😁). |
You just need:
That said, I don't think this would get merged if we would lose the colors. |
Also refined the use of boolean types in the MSBuild targets.
😁 I love the just followed by 20 git commands |
Thanks. I went with a rebase (along the lines of https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request). As for the color, as I wrote it is inconsistent with MSBuild, but if you insist I'll see what I can do. |
From what I can gather it is not possible to log and keep the colored output. You need to choose:
Please note that in the case of #680 the reporter would be (understandably IMHO) more interested in a searchable log than in a colored output, and that in my use case (MSBuild on AppVeyor) I don't even have a console output: only a log, which is empty. |
Closing this PR since it would affect expected color output. |
Description
The MSBuild ToolTask class was designed to help create custom tasks that wraps a command line tool, which is exactly what
VSTestTask
does (it wrapsdotnet.exe exec vstest.console.dll
). Using it allows to delete unneeded code while fixing #680.The console output lost its colorized output (which was expected) but the task gained the ability to be logged.
A bit of maintenance was performed as well, making use of boolean properties where needed (instead of strings), and of
ITaskItem
s for paths (instead of strings as well). Those changes should be compatible with existing usage though.Unit tests have been refactored as well along the lines of the new implementation (and are all green, obviously). A real world test has been performed on a project of mine that was affected by #680, on Windows 10 only.
This might need further real world testing.
Related issue
Fixes #680