Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(979)

Unified Diff: tools/isolate/isolate.py

Issue 10139020: Change --variable argument, must now be spaced, -V foo bar, instead of -V foo=bar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/cacheinvalidation/cacheinvalidation.gyp ('k') | tools/isolate/isolate_smoke_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/isolate/isolate.py
diff --git a/tools/isolate/isolate.py b/tools/isolate/isolate.py
index c01b50b82d6f76240e4bd42b18b0665dd6af8af9..72fa311e773335f4dae58e31252b0f5834df3045 100755
--- a/tools/isolate/isolate.py
+++ b/tools/isolate/isolate.py
@@ -418,11 +418,11 @@ def get_valid_modes():
def main():
- default_variables = ['OS=%s' % trace_inputs.get_flavor()]
+ default_variables = [('OS', trace_inputs.get_flavor())]
if sys.platform in ('win32', 'cygwin'):
- default_variables.append('EXECUTABLE_SUFFIX=.exe')
+ default_variables.append(('EXECUTABLE_SUFFIX', '.exe'))
else:
- default_variables.append('EXECUTABLE_SUFFIX=')
+ default_variables.append(('EXECUTABLE_SUFFIX', ''))
valid_modes = get_valid_modes()
parser = optparse.OptionParser(
usage='%prog [options] [.isolate file]',
@@ -443,10 +443,11 @@ def main():
help='Result file to store the json manifest')
parser.add_option(
'-V', '--variable',
+ nargs=2,
action='append',
default=default_variables,
dest='variables',
- metavar='FOO=BAR',
+ metavar='FOO BAR',
help='Variables to process in the .isolate file, default: %default')
parser.add_option(
'-o', '--outdir', metavar='DIR',
@@ -470,7 +471,7 @@ def main():
isolate_dir = os.path.dirname(input_file)
# Extract the variables.
- variables = dict(i.split('=', 1) for i in options.variables)
+ variables = dict(options.variables)
# Process path variables as a special case. First normalize it, verifies it
# exists, convert it to an absolute path, then set it as relative to
# isolate_dir.
« no previous file with comments | « third_party/cacheinvalidation/cacheinvalidation.gyp ('k') | tools/isolate/isolate_smoke_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698