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

Unified Diff: tools/isolate/isolate.py

Issue 10073004: Returns an error code if no command is present (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 | « no previous file | no next file » | 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 ce7962852622dad309ba20086acfca7907b35130..387cc17d1d15d4e9325341599c5f1169d1622048 100755
--- a/tools/isolate/isolate.py
+++ b/tools/isolate/isolate.py
@@ -372,6 +372,9 @@ def MODErun(
os.makedirs(cwd)
if read_only:
run_test_from_archive.make_writable(outdir, True)
+ if not cmd:
+ print 'No command to run'
+ return 1
cmd = trace_inputs.fix_python_path(cmd)
logging.info('Running %s, cwd=%s' % (cmd, cwd))
return subprocess.call(cmd, cwd=cwd)
@@ -394,6 +397,9 @@ def MODEtrace(
product_dir = os.path.relpath(product_dir, indir)
else:
product_dir = None
+ if not cmd:
+ print 'No command to run'
+ return 1
return trace_inputs.trace_inputs(
'%s.log' % resultfile,
cmd,
@@ -423,7 +429,7 @@ def main():
parser.add_option(
'-v', '--verbose',
action='count',
- default=2 if 'ISOLATE_DEBUG' in os.environ else 0,
+ default=int(os.environ.get('ISOLATE_DEBUG', 0)),
help='Use multiple times')
parser.add_option(
'-m', '--mode',
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698