| OLD | NEW |
| 1 # Copyright 2013 the V8 project authors. All rights reserved. | 1 # Copyright 2013 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 filename = os.path.join(self.root, testcase.path + self.suffix()) | 99 filename = os.path.join(self.root, testcase.path + self.suffix()) |
| 100 with open(filename) as f: | 100 with open(filename) as f: |
| 101 return f.read() | 101 return f.read() |
| 102 | 102 |
| 103 # TODO(machenbach): Share with test/message/testcfg.py | 103 # TODO(machenbach): Share with test/message/testcfg.py |
| 104 def _IgnoreLine(self, string): | 104 def _IgnoreLine(self, string): |
| 105 """Ignore empty lines, valgrind output and Android output.""" | 105 """Ignore empty lines, valgrind output and Android output.""" |
| 106 if not string: return True | 106 if not string: return True |
| 107 return (string.startswith("==") or string.startswith("**") or | 107 return (string.startswith("==") or string.startswith("**") or |
| 108 string.startswith("ANDROID") or | 108 string.startswith("ANDROID") or |
| 109 # These five patterns appear in normal Native Client output. | |
| 110 string.startswith("DEBUG MODE ENABLED") or | |
| 111 string.startswith("tools/nacl-run.py") or | |
| 112 string.find("BYPASSING ALL ACL CHECKS") > 0 or | |
| 113 string.find("Native Client module will be loaded") > 0 or | |
| 114 string.find("NaClHostDescOpen:") > 0 or | |
| 115 # FIXME(machenbach): The test driver shouldn't try to use slow | 109 # FIXME(machenbach): The test driver shouldn't try to use slow |
| 116 # asserts if they weren't compiled. This fails in optdebug=2. | 110 # asserts if they weren't compiled. This fails in optdebug=2. |
| 117 string == "Warning: unknown flag --enable-slow-asserts." or | 111 string == "Warning: unknown flag --enable-slow-asserts." or |
| 118 string == "Try --help for options") | 112 string == "Try --help for options") |
| 119 | 113 |
| 120 def IsFailureOutput(self, testcase): | 114 def IsFailureOutput(self, testcase): |
| 121 if super(WebkitTestSuite, self).IsFailureOutput(testcase): | 115 if super(WebkitTestSuite, self).IsFailureOutput(testcase): |
| 122 return True | 116 return True |
| 123 file_name = os.path.join(self.root, testcase.path) + "-expected.txt" | 117 file_name = os.path.join(self.root, testcase.path) + "-expected.txt" |
| 124 with file(file_name, "r") as expected: | 118 with file(file_name, "r") as expected: |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 for act_iterator in ActBlockIterator(): | 150 for act_iterator in ActBlockIterator(): |
| 157 for (expected, actual) in itertools.izip_longest( | 151 for (expected, actual) in itertools.izip_longest( |
| 158 ExpIterator(), act_iterator, fillvalue=''): | 152 ExpIterator(), act_iterator, fillvalue=''): |
| 159 if expected != actual: | 153 if expected != actual: |
| 160 return True | 154 return True |
| 161 return False | 155 return False |
| 162 | 156 |
| 163 | 157 |
| 164 def GetSuite(name, root): | 158 def GetSuite(name, root): |
| 165 return WebkitTestSuite(name, root) | 159 return WebkitTestSuite(name, root) |
| OLD | NEW |