Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: test/message/testcfg.py

Issue 13638013: Modifications to tests and test tools for Native Client V8. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Disable a test Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 def GetSourceForTest(self, testcase): 68 def GetSourceForTest(self, testcase):
69 filename = os.path.join(self.root, testcase.path + self.suffix()) 69 filename = os.path.join(self.root, testcase.path + self.suffix())
70 with open(filename) as f: 70 with open(filename) as f:
71 return f.read() 71 return f.read()
72 72
73 def _IgnoreLine(self, string): 73 def _IgnoreLine(self, string):
74 """Ignore empty lines, valgrind output and Android output.""" 74 """Ignore empty lines, valgrind output and Android output."""
75 if not string: return True 75 if not string: return True
76 return (string.startswith("==") or string.startswith("**") or 76 return (string.startswith("==") or string.startswith("**") or
77 string.startswith("ANDROID")) 77 string.startswith("ANDROID") or
78 # These five patterns appear in normal Native Client output.
79 string.startswith("DEBUG MODE ENABLED") or
80 string.startswith("tools/nacl-run.py") or
81 string.find("BYPASSING ALL ACL CHECKS") > 0 or
82 string.find("Native Client module will be loaded") > 0 or
83 string.find("NaClHostDescOpen:") > 0)
78 84
79 def IsFailureOutput(self, output, testpath): 85 def IsFailureOutput(self, output, testpath):
80 expected_path = os.path.join(self.root, testpath + ".out") 86 expected_path = os.path.join(self.root, testpath + ".out")
81 expected_lines = [] 87 expected_lines = []
82 # Can't use utils.ReadLinesFrom() here because it strips whitespace. 88 # Can't use utils.ReadLinesFrom() here because it strips whitespace.
83 with open(expected_path) as f: 89 with open(expected_path) as f:
84 for line in f: 90 for line in f:
85 if line.startswith("#") or not line.strip(): continue 91 if line.startswith("#") or not line.strip(): continue
86 expected_lines.append(line) 92 expected_lines.append(line)
87 raw_lines = output.stdout.splitlines() 93 raw_lines = output.stdout.splitlines()
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 return ['d8'] 215 return ['d8']
210 216
211 def GetTestStatus(self, sections, defs): 217 def GetTestStatus(self, sections, defs):
212 status_file = join(self.root, 'message.status') 218 status_file = join(self.root, 'message.status')
213 if exists(status_file): 219 if exists(status_file):
214 test.ReadConfigurationInto(status_file, sections, defs) 220 test.ReadConfigurationInto(status_file, sections, defs)
215 221
216 222
217 def GetConfiguration(context, root): 223 def GetConfiguration(context, root):
218 return MessageTestConfiguration(context, root) 224 return MessageTestConfiguration(context, root)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698