Closed Bug 1503613 Opened 6 years ago Closed 5 years ago

mach xpcshell-test should show command in shell syntax

Categories

(Testing :: Python Test, defect)

Version 3
defect
Not set
normal

Tracking

(firefox66 fixed)

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: jimb, Assigned: jimb)

Details

Attachments

(1 file)

xpcshell-test should show each xpcshell command it executes using Unix shell syntax, so that developers can copy and paste the command into their shell for debugging.
When passed the `--verbose` flag, `mach xpcshell-test` already prints the
current directory, environment variables, and command used for the test.
However, it prints them in Python syntax. This seems like a good thing to do, as
it's a clear indication of what the test is actually doing. But if one wants to
reproduce a problem by running the xpcshell command directly, it's an
error-prone pain to convert from Python lists of strings to the Bourne shell
syntax.

Fortunately, the Python 2.7 `pipes` module has a function, `pipes.quote`, which
produces properly quoted Unix shell commands, ready to be copied and pasted into
one's terminal.

Unfortunately, the xpcshell tests still clean up the $obj/temp/xpc-plugins-FOO
directory, so this still isn't quite ready to go.
Assignee: nobody → jimb
... Well, the patch is still useful and ready to go. It's just that it's not quite a seamless experience yet.
Pushed by jblandy@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/821643f00719
Make 'mach xpcshell-test' print the command in shell syntax. r=ted
https://hg.mozilla.org/mozilla-central/rev/821643f00719
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: