summaryrefslogtreecommitdiffstats
path: root/tools/cr
diff options
context:
space:
mode:
authorskyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-13 16:16:39 +0000
committerskyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-13 16:16:39 +0000
commitbe9a064d44117c99dfa32d18c27271a4b8ad3655 (patch)
tree6c4a0e1af81813d6cb627cf937f8d28454064da1 /tools/cr
parent6c59d6ac194eb523187a64385e274ee3bcf10ae6 (diff)
downloadchromium_src-be9a064d44117c99dfa32d18c27271a4b8ad3655.zip
chromium_src-be9a064d44117c99dfa32d18c27271a4b8ad3655.tar.gz
chromium_src-be9a064d44117c99dfa32d18c27271a4b8ad3655.tar.bz2
cr: Fix quoting of shell arguments
Make it possible to give quoted arguments to cr shell. TEST=cr shell tools/perf/run_benchmark --browser=release \ smoothness.tough_scheduling_cases \ --extra-browser-args="-- enable-impl-side-painting \ --enable-threaded-compositing" NOTRY=true Review URL: https://codereview.chromium.org/114953005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240666 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/cr')
-rw-r--r--tools/cr/cr/base/host.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/cr/cr/base/host.py b/tools/cr/cr/base/host.py
index e9766ec..13ac641 100644
--- a/tools/cr/cr/base/host.py
+++ b/tools/cr/cr/base/host.py
@@ -5,6 +5,7 @@
"""Module for build host support."""
import os
+import pipes
import subprocess
import cr
@@ -101,7 +102,8 @@ class Host(cr.Plugin, cr.Plugin.Type):
@cr.Plugin.activemethod
def Shell(self, context, *command):
- return self._Execute(context, [' '.join(command)], shell=True)
+ command = ' '.join([pipes.quote(arg) for arg in command])
+ return self._Execute(context, [command], shell=True)
@cr.Plugin.activemethod
def Execute(self, context, *command):