Make message pass in Android testing

Review URL: https://chromiumcodereview.appspot.com/10805006
Patch from Haitao Feng <haitao.feng@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12123 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
jkummerow@chromium.org 2012-07-18 11:55:39 +00:00
parent 6a60899022
commit c20c99a98c

View File

@ -41,9 +41,10 @@ class MessageTestCase(test.TestCase):
self.config = config
def IgnoreLine(self, str):
"""Ignore empty lines and valgrind output."""
"""Ignore empty lines, valgrind output and Android output."""
if not str: return True
else: return str.startswith('==') or str.startswith('**')
return (str.startswith('==') or str.startswith('**') or
str.startswith('Error'))
def IsFailureOutput(self, output):
f = file(self.expected)
@ -62,7 +63,7 @@ class MessageTestCase(test.TestCase):
pattern = '^%s$' % pattern
patterns.append(pattern)
# Compare actual output with the expected
raw_lines = output.stdout.split('\n')
raw_lines = output.stdout.splitlines()
outlines = [ s for s in raw_lines if not self.IgnoreLine(s) ]
if len(outlines) != len(patterns):
return True