Closed Bug 566665 Opened 14 years ago Closed 14 years ago

jstests.py -s should print command lines rather than lists of strings

Categories

(Core :: JavaScript Engine, defect)

Other Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jorendorff, Assigned: jorendorff)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

without this patch,

$ python tests/jstests.py -s  ./d-objdir/js
['/home/jorendorff/dev/tracemonkey/js/src/d-objdir/js', '-f', 'shell.js', '-f', 'e4x/shell.js', '-f', 'e4x/decompilation/shell.js', '-f', './e4x/decompilation/regress-349814.js']
['/home/jorendorff/dev/tracemonkey/js/src/d-objdir/js', '-f', 'shell.js', '-f', 'e4x/shell.js', '-f', 'e4x/decompilation/shell.js', '-f', './e4x/decompilation/decompile-xml-escapes.js']
['/home/jorendorff/dev/tracemonkey/js/src/d-objdir/js', '-f', 'shell.js', '-f', 'e4x/shell.js', '-f', 'e4x/decompilation/shell.js', '-f', './e4x/decompilation/regress-349815.js']
...

With the patch, the output is friendlier to cut-and-paste:

/home/jorendorff/dev/tracemonkey/js/src/d-objdir/js -f shell.js -f e4x/shell.js -f e4x/decompilation/shell.js -f ./e4x/decompilation/regress-349814.js
/home/jorendorff/dev/tracemonkey/js/src/d-objdir/js -f shell.js -f e4x/shell.js -f e4x/decompilation/shell.js -f ./e4x/decompilation/decompile-xml-escapes.js
/home/jorendorff/dev/tracemonkey/js/src/d-objdir/js -f shell.js -f e4x/shell.js -f e4x/decompilation/shell.js -f ./e4x/decompilation/regress-349815.js
...
Attached patch v1Splinter Review
subprocess.list2cmdline is totally undocumented and its docstring is very explicit that it follows MS CRT rules for building the command line. But that's good enough for bash in all but crazy and unlikely cases.
Assignee: general → jorendorff
Attachment #446007 - Flags: review?(dmandelin)
Comment on attachment 446007 [details] [diff] [review]
v1

Cool. I've wished this could be done for some time, but I didn't know it could be done properly so easily.
Attachment #446007 - Flags: review?(dmandelin) → review+
http://hg.mozilla.org/tracemonkey/rev/3fe3507be338
Whiteboard: fixed-in-tracemonkey
+1 jorendorff!
http://hg.mozilla.org/mozilla-central/rev/3fe3507be338
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: