archives

« Bugzilla Issues Index

#1457 — command-line script on Windows incorrectly quotes all arguments before exec


On Windows the test262.py script adds double quotes around the javascript shell and the javascript shell. The script should just quote the javascript shell and possibly the temp file. Removing the double quotes is a simple workaround to get the script running.

Steps to reproduce:
On Windows in the cmd.exe or in bash:
python tools\packaging\test262.py --command=c:\builds\spidermonkey\js.exe bestPractice

actual output:
The System cannot find the path specified.

line 232 of test.py is:
if IsWindows():
args = '"%s"' % command
quoting the entire has the effect of execing:
"c:\builds\spidermonkey\js.exe c:\users\<username>\appdata\local\temp\test262-rnsfjw.js"

the command cannot have quotes around the entire string, it must either not have any quotes (would probably fail if the path to the javascript shell had spaces in the name) or have quotes just around the shell.
c:\builds\spidermonkey\js.exe c:\users\<username>\appdata\local\temp\test262-rnsfjw.js
OR
"c:\builds\spidermonkey\js.exe" "c:\users\<username>\appdata\local\temp\test262-rnsfjw.js"


Created attachment 31
simple patch to remove quoting entire command on windows

modifiying test262.py with this patch fixes my problem but a better solution would place quotes around the value of command.


pushed in http://hg.ecmascript.org/tests/test262/rev/b8b49c010686