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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
68 return testcase.flags + result | 68 return testcase.flags + result |
69 | 69 |
70 def GetSourceForTest(self, testcase): | 70 def GetSourceForTest(self, testcase): |
71 filename = os.path.join(self.root, testcase.path + self.suffix()) | 71 filename = os.path.join(self.root, testcase.path + self.suffix()) |
72 with open(filename) as f: | 72 with open(filename) as f: |
73 return f.read() | 73 return f.read() |
74 | 74 |
75 def _IgnoreLine(self, string): | 75 def _IgnoreLine(self, string): |
76 """Ignore empty lines, valgrind output, Android output.""" | 76 """Ignore empty lines, valgrind output, Android output.""" |
77 if not string: return True | 77 if not string: return True |
78 if not string.strip(): return True | |
Dmitry Lomov (no reviews)
2014/12/08 14:35:51
We strip expected too in line 94
| |
78 return (string.startswith("==") or string.startswith("**") or | 79 return (string.startswith("==") or string.startswith("**") or |
79 string.startswith("ANDROID") or | 80 string.startswith("ANDROID") or |
80 # These five patterns appear in normal Native Client output. | 81 # These five patterns appear in normal Native Client output. |
81 string.startswith("DEBUG MODE ENABLED") or | 82 string.startswith("DEBUG MODE ENABLED") or |
82 string.startswith("tools/nacl-run.py") or | 83 string.startswith("tools/nacl-run.py") or |
83 string.find("BYPASSING ALL ACL CHECKS") > 0 or | 84 string.find("BYPASSING ALL ACL CHECKS") > 0 or |
84 string.find("Native Client module will be loaded") > 0 or | 85 string.find("Native Client module will be loaded") > 0 or |
85 string.find("NaClHostDescOpen:") > 0) | 86 string.find("NaClHostDescOpen:") > 0) |
86 | 87 |
87 def IsFailureOutput(self, output, testpath): | 88 def IsFailureOutput(self, output, testpath): |
(...skipping 17 matching lines...) Expand all Loading... | |
105 if not re.match(pattern, actual): | 106 if not re.match(pattern, actual): |
106 return True | 107 return True |
107 return False | 108 return False |
108 | 109 |
109 def StripOutputForTransmit(self, testcase): | 110 def StripOutputForTransmit(self, testcase): |
110 pass | 111 pass |
111 | 112 |
112 | 113 |
113 def GetSuite(name, root): | 114 def GetSuite(name, root): |
114 return MessageTestSuite(name, root) | 115 return MessageTestSuite(name, root) |
OLD | NEW |