[SERVER-42607] add quoting to resmoke's invocation for local usage line Created: 02/Aug/19 Updated: 29/Oct/23 Resolved: 22/Apr/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Testing Infrastructure |
| Affects Version/s: | None |
| Fix Version/s: | 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Eric Milkie | Assignee: | Marianna Petrova (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | tig-qwin-eligible, tig-resmoke | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Sprint: | STM 2020-04-20, STM 2020-05-04 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Story Points: | 2 | ||||||||||||||||
| Description |
|
Currently, there are situations where resmoke's local invocation line cannot be used verbatim; one such example is:
Could resmoke quote the line so that it would work with standard Bash? I'm not sure how hard it would be to figure out where quotes would need to go. (One simple way to do this would be to simply add double quotes around every parameter.) |
| Comments |
| Comment by Githook User [ 22/Apr/20 ] | ||||
|
Author: {'name': 'piatrovm', 'email': 'maryana.piatrova@gmail.com', 'username': 'piatrovm'}Message: | ||||
| Comment by Githook User [ 22/Apr/20 ] | ||||
|
Author: {'name': 'piatrovm', 'email': 'maryana.piatrova@gmail.com', 'username': 'piatrovm'}Message: | ||||
| Comment by Marianna Petrova (Inactive) [ 21/Apr/20 ] | ||||
| Comment by Max Hirschhorn [ 10/Apr/20 ] | ||||
I'd like to say that it isn't important for the command line to match verbatim. What is important is that it can be run via bash.
We could also consider making a similar change to Process.as_command() so the other command line invocations resmoke.py outputs can be copied and run via bash as well. | ||||
| Comment by Robert Guo (Inactive) [ 09/Apr/20 ] | ||||
|
marianna.petrova Try this:
You'll want the second line to say --reportFile="my report.json", similar to the first line. | ||||
| Comment by Marianna Petrova (Inactive) [ 09/Apr/20 ] | ||||
|
Looks like logs expired here, could anyone help with examples? | ||||
| Comment by Max Hirschhorn [ 02/Aug/19 ] | ||||
https://docs.python.org/3/library/shlex.html#shlex.quote is the way to do this in Python. |