-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
dotnet test eats quotes in TestRunParameters #13130
Comments
Hi, I have started looking at it. Stack--> Other Recommendations: |
Below are our findings and next steps:
Other Inputs: Input: Next Steps:
|
microsoft/vstest#862 (comment) I was exploring and fixing the vstest part here. It would be nice if the final syntax was compatible with these ways of escaping, as we don't know from whichOS the user will copy the command. ( Notice that on bash we escape parentheses and spaces.) # cmd
dotnet test -- TestRunParameters.Parameter(name=\"myParam\", value=\"value\")
# powershell
dotnet test --% -- TestRunParameters.Parameter(name=\"myParam\", value=\"value\")
# bash
dotnet test -- TestRunParameters.Parameter\(name=\"myParam\",\ value=\"value\"\) |
yes @nohwnd once this issue microsoft/azure-pipelines-task-lib#648 is fixed the escape sequence will work |
I am experiencing this same issue with the --collect parameter when attempting to use coverlet as part of my build pipeline. URL escapes do not work. |
@kcentralsquare Can you try using %22 instead of quotes and see if that works. For time being this seems to be the only workaround here. |
That did not work for me @saquibkhan. |
@kcentralsquare If it's possible can you share the command and argument? |
@kcentralsquare are you still blocked on this issue or can we close this now? |
@nehsharmMS Have you fixed the issue? I've switched to a script instead of using this task, but I would much prefer to use the task. |
@saquibkhan I tried with the
And it "eats" up the quotes so the OutputFormat won't show up properly. I'm using a Linux instance to build |
@jamierytlewski @kcentralsquare we are dependent on this issue microsoft/azure-pipelines-task-lib#648 getting fixed. Could you please re-create that issue there since the old one got closed due to no activity. |
WORKAROUND
|
This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days |
@phanikmmsft please remove the stale label. Can we get this fixed please? |
This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days |
@ShreyasRmsft Looks like the upstream issue was fixed about 9 months ago. Any updates on this one getting fixed? |
Any updates on this issue? I am getting failures passing multiple TestRunParameters due to this issue. The cmd below fails
C:\Program Files\dotnet\sdk\6.0.302\NuGet.RestoreEx.targets(19,5): error : The name "TestRunParameters.Parameter(name" contains an invalid character "." |
Is there any update on this? |
Per earlier comment, once upstream microsoft/azure-pipelines-task-lib#648 was fixed this should automatically resolve, but that does not appear to be the case. @ShreyasRmsft @nehsharmMS @saquibkhan are there any updates to share on this? |
Issue is still there. This worked for me:
|
this work for me as well (y) |
This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days |
@rasunkar this is still a problem, please consider re-opening and fixing the escaping. It would help us with test filtering when there are special characters that need escaping. |
Note
Issues in this repo are for tracking bugs, feature requests and questions for the tasks in this repo
For a list:
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks
If you have an issue or request for the Azure Pipelines service, use developer community instead:
https://developercommunity.visualstudio.com/spaces/21/index.html )
Required Information
Entering this information will route you directly to the right team and expedite traction.
Question, Bug, or Feature?
Type: Bug
Enter Task Name: DotNetCoreCLI@2
list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks
Environment
Server - Azure Pipelines or TFS on-premises?
Azure pipelines
If using TFS on-premises, provide the version:
If using Azure Pipelines, provide the account name, team project name, build definition name/build number:
Agent - Hosted or Private:
If using Hosted agent, provide agent queue name:
If using private agent, provide the OS of the machine running the agent and the agent version:
Issue Description
This is the only way I am able to pass TestRunParameters to the run. This was reported here: microsoft/vstest#2387 and the escaping was fixed in vstest and dotnet sdk, but some additional rules are applied on the AzDO task side. Because for example \ is replaced by / and quotes are eaten by the task. So it is not true that what works on the command line works in the task (mentioned here #10712 (comment) ) and none of the approaches described there worked for me, except for providing the quotes as URL escapes
%22
.Ideally the user would be able to copy paste from the command line, where
\"
is the way to escape the quotes properly.Task logs
https://dev.azure.com/jajares/params/_build?definitionId=6&_a=summary
Troubleshooting
Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting
Error logs
[Insert error from the logs here for a quick overview]
The text was updated successfully, but these errors were encountered: