Bug 669483: automation.py should handle logging non-ASCII stdout, r=ted
authorGavin Sharp <gavin@gavinsharp.com>
Mon, 27 Jun 2011 19:49:41 -0400
changeset 73380 8e54ffd82a58c4d90425ad9c42d7a37f24e9081b
parent 73353 b4725ef65601a3f52b6d330dcac23dd0b2f55642
child 73381 3c2ffce461c1f716a1632340f15f62859d7f0d75
push id235
push userbzbarsky@mozilla.com
push dateTue, 27 Sep 2011 17:13:04 +0000
treeherdermozilla-beta@2d1e082d176a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs669483
milestone8.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 669483: automation.py should handle logging non-ASCII stdout, r=ted
build/automation.py.in
--- a/build/automation.py.in
+++ b/build/automation.py.in
@@ -758,17 +758,17 @@ user_pref("camino.use_system_proxy_setti
         logsource = stackFixerProcess.stdout
 
       (line, didTimeout) = self.readWithTimeout(logsource, timeout)
       while line != "" and not didTimeout:
         if "TEST-START" in line and "|" in line:
           self.lastTestSeen = line.split("|")[1].strip()
         if stackFixerFunction:
           line = stackFixerFunction(line)
-        self.log.info(line.rstrip())
+        self.log.info(line.rstrip().decode("UTF-8", "ignore"))
         if self.UNIXISH and not debuggerInfo and not self.haveDumpedScreen and "TEST-UNEXPECTED-FAIL" in line and "Test timed out" in line:
           self.dumpScreen(utilityPath)
 
         (line, didTimeout) = self.readWithTimeout(logsource, timeout)
         if not hitMaxTime and maxTime and datetime.now() - startTime > timedelta(seconds = maxTime):
           # Kill the application, but continue reading from stack fixer so as not to deadlock on stackFixerProcess.wait().
           hitMaxTime = True
           self.log.info("TEST-UNEXPECTED-FAIL | %s | application ran for longer than allowed maximum time of %d seconds", self.lastTestSeen, int(maxTime))