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

Unified Diff: command_wrapper/bin/command_wrapper.py

Issue 3013052: Adding a search by nodename option.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/
Patch Set: '' Created 10 years, 5 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 | command_wrapper/command_wrapper_web.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: command_wrapper/bin/command_wrapper.py
===================================================================
--- command_wrapper/bin/command_wrapper.py (revision 54349)
+++ command_wrapper/bin/command_wrapper.py (working copy)
@@ -35,6 +35,9 @@
stdout: text of stdout
stderr: text of stderr
runtime: command runtime in seconds
+ Returns:
+ True/False indicating if the current result should be accepted without
+ further retry.
"""
uname = platform.uname()
params = urllib.urlencode({
@@ -55,8 +58,9 @@
'uname_processor': uname[5],
})
f = urllib.urlopen(options.logurl, params)
- f.read()
+ ret = f.read()
f.close()
+ return int(ret) != 0
def main(argv):
@@ -80,8 +84,10 @@
sys.stdout.write(p_stdout)
sys.stderr.write(p_stderr)
runtime = time.time() - tm
- LogCommand(options, command_id, r, cmd,
- p.returncode, p_stdout, p_stderr, runtime)
+ accept = LogCommand(options, command_id, r, cmd,
+ p.returncode, p_stdout, p_stderr, runtime)
+ if accept:
+ return p.returncode
if p.returncode == 0:
return 0
print 'Command %s failed with retcode %d, try %d.' % (
« no previous file with comments | « no previous file | command_wrapper/command_wrapper_web.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698