comparison mx/sanitycheck.py @ 7562:1c09bcebd61f

spelling fix
author Doug Simon <doug.simon@oracle.com>
date Sun, 27 Jan 2013 23:09:56 +0100
parents cbcee2e1ce51
children 3aab15f42934
comparison
equal deleted inserted replaced
7561:0fdea35766a8 7562:1c09bcebd61f
200 time = re.compile(r"Bootstrapping Graal\.+ in (?P<time>[0-9]+) ms") 200 time = re.compile(r"Bootstrapping Graal\.+ in (?P<time>[0-9]+) ms")
201 scoreMatcher = Matcher(time, {'const:group' : 'const:Bootstrap', 'const:name' : 'const:BootstrapTime', 'const:score' : 'time'}) 201 scoreMatcher = Matcher(time, {'const:group' : 'const:Bootstrap', 'const:name' : 'const:BootstrapTime', 'const:score' : 'time'})
202 scoreMatcherBig = Matcher(time, {'const:group' : 'const:Bootstrap-bigHeap', 'const:name' : 'const:BootstrapTime', 'const:score' : 'time'}) 202 scoreMatcherBig = Matcher(time, {'const:group' : 'const:Bootstrap-bigHeap', 'const:name' : 'const:BootstrapTime', 'const:score' : 'time'})
203 203
204 tests = [] 204 tests = []
205 tests.append(Test("Bootstrap", ['-version'], successREs=[time], scoreMatchers=[scoreMatcher], ingoreVms=['client', 'server'])) 205 tests.append(Test("Bootstrap", ['-version'], successREs=[time], scoreMatchers=[scoreMatcher], ignoredVMs=['client', 'server']))
206 tests.append(Test("Bootstrap-bigHeap", ['-version'], successREs=[time], scoreMatchers=[scoreMatcherBig], vmOpts=['-Xms2g'], ingoreVms=['client', 'server'])) 206 tests.append(Test("Bootstrap-bigHeap", ['-version'], successREs=[time], scoreMatchers=[scoreMatcherBig], vmOpts=['-Xms2g'], ignoredVMs=['client', 'server']))
207 return tests 207 return tests
208 208
209 """ 209 """
210 Encapsulates a single program that is a sanity test and/or a benchmark. 210 Encapsulates a single program that is a sanity test and/or a benchmark.
211 """ 211 """
212 class Test: 212 class Test:
213 def __init__(self, name, cmd, successREs=[], failureREs=[], scoreMatchers=[], vmOpts=[], defaultCwd=None, ingoreVms=[]): 213 def __init__(self, name, cmd, successREs=[], failureREs=[], scoreMatchers=[], vmOpts=[], defaultCwd=None, ignoredVMs=[]):
214 self.name = name 214 self.name = name
215 self.successREs = successREs 215 self.successREs = successREs
216 self.failureREs = failureREs + [re.compile(r"Exception occured in scope: ")] 216 self.failureREs = failureREs + [re.compile(r"Exception occured in scope: ")]
217 self.scoreMatchers = scoreMatchers 217 self.scoreMatchers = scoreMatchers
218 self.vmOpts = vmOpts 218 self.vmOpts = vmOpts
219 self.cmd = cmd 219 self.cmd = cmd
220 self.defaultCwd = defaultCwd 220 self.defaultCwd = defaultCwd
221 self.ingoreVms = ingoreVms; 221 self.ignoredVMs = ignoredVMs;
222 222
223 223
224 def __str__(self): 224 def __str__(self):
225 return self.name 225 return self.name
226 226
227 def test(self, vm, cwd=None, opts=[], vmbuild=None): 227 def test(self, vm, cwd=None, opts=[], vmbuild=None):
228 """ 228 """
229 Run this program as a sanity test. 229 Run this program as a sanity test.
230 """ 230 """
231 if (vm in self.ingoreVms): 231 if (vm in self.ignoredVMs):
232 return True; 232 return True;
233 if cwd is None: 233 if cwd is None:
234 cwd = self.defaultCwd 234 cwd = self.defaultCwd
235 parser = OutputParser(nonZeroIsFatal = False) 235 parser = OutputParser(nonZeroIsFatal = False)
236 jvmError = re.compile(r"(?P<jvmerror>([A-Z]:|/).*[/\\]hs_err_pid[0-9]+\.log)") 236 jvmError = re.compile(r"(?P<jvmerror>([A-Z]:|/).*[/\\]hs_err_pid[0-9]+\.log)")
267 267
268 def bench(self, vm, cwd=None, opts=[], vmbuild=None): 268 def bench(self, vm, cwd=None, opts=[], vmbuild=None):
269 """ 269 """
270 Run this program as a benchmark. 270 Run this program as a benchmark.
271 """ 271 """
272 if (vm in self.ingoreVms): 272 if (vm in self.ignoredVMs):
273 return {}; 273 return {};
274 if cwd is None: 274 if cwd is None:
275 cwd = self.defaultCwd 275 cwd = self.defaultCwd
276 parser = OutputParser(nonZeroIsFatal = False) 276 parser = OutputParser(nonZeroIsFatal = False)
277 277