| OLD | NEW |
| 1 # Copyright 2008 the V8 project authors. All rights reserved. | 1 # Copyright 2008 the V8 project authors. All rights reserved. |
| 2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
| 3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
| 4 # met: | 4 # met: |
| 5 # | 5 # |
| 6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
| 7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
| 8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
| 9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
| 10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 def __init__(self, path, file, expected, mode, context, config): | 37 def __init__(self, path, file, expected, mode, context, config): |
| 38 super(MessageTestCase, self).__init__(context, path, mode) | 38 super(MessageTestCase, self).__init__(context, path, mode) |
| 39 self.file = file | 39 self.file = file |
| 40 self.expected = expected | 40 self.expected = expected |
| 41 self.config = config | 41 self.config = config |
| 42 | 42 |
| 43 def IgnoreLine(self, str): | 43 def IgnoreLine(self, str): |
| 44 """Ignore empty lines, valgrind output and Android output.""" | 44 """Ignore empty lines, valgrind output and Android output.""" |
| 45 if not str: return True | 45 if not str: return True |
| 46 return (str.startswith('==') or str.startswith('**') or | 46 return (str.startswith('==') or str.startswith('**') or |
| 47 str.startswith('Error')) | 47 str.startswith('ANDROID')) |
| 48 | 48 |
| 49 def IsFailureOutput(self, output): | 49 def IsFailureOutput(self, output): |
| 50 f = file(self.expected) | 50 f = file(self.expected) |
| 51 # Skip initial '#' comment and spaces | 51 # Skip initial '#' comment and spaces |
| 52 for line in f: | 52 for line in f: |
| 53 if (not line.startswith('#')) and (not line.strip()): | 53 if (not line.startswith('#')) and (not line.strip()): |
| 54 break | 54 break |
| 55 # Convert output lines to regexps that we can match | 55 # Convert output lines to regexps that we can match |
| 56 env = { 'basename': basename(self.file) } | 56 env = { 'basename': basename(self.file) } |
| 57 patterns = [ ] | 57 patterns = [ ] |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 return ['d8'] | 129 return ['d8'] |
| 130 | 130 |
| 131 def GetTestStatus(self, sections, defs): | 131 def GetTestStatus(self, sections, defs): |
| 132 status_file = join(self.root, 'message.status') | 132 status_file = join(self.root, 'message.status') |
| 133 if exists(status_file): | 133 if exists(status_file): |
| 134 test.ReadConfigurationInto(status_file, sections, defs) | 134 test.ReadConfigurationInto(status_file, sections, defs) |
| 135 | 135 |
| 136 | 136 |
| 137 def GetConfiguration(context, root): | 137 def GetConfiguration(context, root): |
| 138 return MessageTestConfiguration(context, root) | 138 return MessageTestConfiguration(context, root) |
| OLD | NEW |