Use shlex.split() to parse --special-command test argument

This allows passing commands with quoted spaces, such as:
  tools/test-wrapper-gypbuild.py --special-command \
    "$DR/bin64/drrun -ops '-reset_every_nth_pending 0' @" \
    ...

R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/11143018
Patch from Reid Kleckner <rnk@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12744 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent bcb383e0
......@@ -1371,8 +1371,9 @@ def GetSpecialCommandProcessor(value):
else:
pos = value.find('@')
import urllib
prefix = urllib.unquote(value[:pos]).split()
suffix = urllib.unquote(value[pos+1:]).split()
import shlex
prefix = shlex.split(urllib.unquote(value[:pos]))
suffix = shlex.split(urllib.unquote(value[pos+1:]))
def ExpandCommand(args):
return prefix + args + suffix
return ExpandCommand
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment