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

Unified Diff: Tools/Scripts/webkitpy/tool/commands/rebaseline.py

Issue 329873005: Fix rebaseline-o-matic logging (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix git cl Created 6 years, 6 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/Scripts/webkitpy/tool/commands/rebaseline.py
diff --git a/Tools/Scripts/webkitpy/tool/commands/rebaseline.py b/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
index 5e4c3279ca532d99e0dd381e07e85994a8735dde..72b9b40987d7adcb7c23d4375290e908ce80c0c7 100644
--- a/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
+++ b/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
@@ -762,22 +762,19 @@ class AutoRebaseline(AbstractParallelRebaselineCommand):
if options.verbose:
subprocess_command.append('--verbose')
- process = self._tool.executive.popen(subprocess_command, stdout=self._tool.executive.PIPE, stderr=self._tool.executive.PIPE)
+ process = self._tool.executive.popen(subprocess_command, stdout=self._tool.executive.PIPE, stderr=self._tool.executive.STDOUT)
last_output_time = time.time()
# git cl sometimes completely hangs. Bail if we haven't gotten any output to stdout/stderr in a while.
while process.poll() == None and time.time() < last_output_time + self.SECONDS_BEFORE_GIVING_UP:
- # FIXME: This isn't awesome. It may improperly interleave stdout and stderr?
+ # FIXME: This doesn't make any sense. readline blocks, so all this code to
+ # try and bail is useless. Instead, we should do the readline calls on a
+ # subthread. Then the rest of this code would make sense.
out = process.stdout.readline().rstrip('\n')
if out:
last_output_time = time.time()
_log.info(out)
- err = process.stdout.readline().rstrip('\n')
- if err:
- last_output_time = time.time()
- _log.error(err)
-
if process.poll() == None:
_log.error('Command hung: %s' % subprocess_command)
return False
@@ -885,20 +882,13 @@ class RebaselineOMatic(AbstractDeclarativeCommand):
self._log_to_server(out)
return out
- def _log_remaining_lines(self, handle):
- out = self._log_line(handle)
- while out:
- out = self._log_line(handle)
-
def _run_logged_command(self, command):
- process = self._tool.executive.popen(command, stdout=self._tool.executive.PIPE, stderr=self._tool.executive.PIPE)
- while process.poll() == None:
- # FIXME: This should probably batch up lines if they're available and log to the server once.
- self._log_line(process.stdout)
- self._log_line(process.stderr)
+ process = self._tool.executive.popen(command, stdout=self._tool.executive.PIPE, stderr=self._tool.executive.STDOUT)
- self._log_remaining_lines(process.stdout)
- self._log_remaining_lines(process.stderr)
+ out = self._log_line(process.stdout)
+ while out:
+ # FIXME: This should probably batch up lines if they're available and log to the server once.
+ out = self._log_line(process.stdout)
def _do_one_rebaseline(self):
try:
« 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