-
-
Notifications
You must be signed in to change notification settings - Fork 729
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
DotCover aliasses are using windows style cli arguments on unix-like systems #4096
Comments
This should be fairly easy to fix:
The fix would be to always emit Unit-style arguments. |
I've tried changing the paths to Unix-style in the variables stored in cake file, yet the issue is not resolved. Can you explain what approach is "dotCover on Linux only supports Unix-style arguments", you are referring here. Is DotCover supports Linux distribution. From the Jetbrains official site for DotCover download under system requirements I can only see Windows machine. Is this also same for CLI, if that so it wouldn't support in Linux distributions right ? I've also searched for any alternatives to dotCover to run in linux env, but I couldn't find any. Is there any alternative present to run in Linux OS. |
I'm not changing to change the paths, I'm saying that Cake should pass Unix-style arguments, so prefixed by
instead of:
The |
@Sebazzz Got it, I understand your approach. Before dive into deeper, let me update you I'm kinda new in cake build working, I'm constantly learning though. What I guess or have knowledge so far:
This code part in cake script executes like this: Cake build translates the code-part to this CLI argument based and then executes, right ? What I would like to have: Can we able to configure this dotCoverCover, translate the execution according to linux ? Or Is there any approach in achieving the Goal. |
Sorry, you can't (or at least, not really). This needs to be fixed in Cake. As a workaround you can do this.
And in your
This is a huge hack of course, but it works as a workaround until this bug is fixed. |
One of the confusions I have with Cake DotCover, related to this issue, is it's not clear to me how to tell Cake to use all the different command line tools JetBrains now have for running DotCover. For example, there's at a minimum, either running I certainly agree that the Unix-style arguments should be used uniformly, I guess I'm curious whether this issue is highlighting a wider mismatch in expectations (i.e. it's only ever been designed with Windows DotCover in mind). I don't see how the current Cake |
Prerequisites
Cake runner
Cake .NET Tool
Cake version
2.3.0
Operating system
Linux
Operating system architecture
64-Bit
CI Server
TeamCity and localy
What are you seeing?
When running on unix-like systems (im my case mcr.microsoft.com/dotnet/sdk:6.0-alpine docker container) DotCoverAliasses are still using windows style cli arguments. For example, when running task:
DotCoverCover executes:
/usr/bin/mono "/src/tools/JetBrains.dotCover.GlobalTool.2022.3.0/tools/netcoreapp3.1/any/dotCover.exe" Cover /TargetExecutable="/usr/bin/dotnet" /TargetArguments="test \"./Test.sln\" --configuration Release - -no-build" /Output="/src/Out/Coverage/result.dcvr"
As a result an error occures:
[JetBrains dotCover] Configuration file '/TargetExecutable=/usr/bin/dotnet' not found.
Running on Windows 10 works perfectly
What is expected?
DotCover works on linux same way it is works on Windows
Steps to Reproduce
Run DotCoverCover(or other DotCoverAlias) in a cake file with any test runner (even passing null as an Action has the same result) on a linux system
Output log
When running task:
The text was updated successfully, but these errors were encountered: