Mercurial > hg > graal-compiler
comparison mx/sanitycheck.py @ 5143:f5511facb897
Add posibility to ignore some tests/benchmarks with some vms : use it to disable bootstrap benchmarks for client/server
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Thu, 22 Mar 2012 18:28:18 +0100 |
parents | e87460fbd2f1 |
children | eeb2ca1bf3a9 |
comparison
equal
deleted
inserted
replaced
5142:667c7bc2435b | 5143:f5511facb897 |
---|---|
180 | 180 |
181 def getBootstraps(): | 181 def getBootstraps(): |
182 time = re.compile(r"Bootstrapping Graal\.+ in (?P<time>[0-9]+) ms") | 182 time = re.compile(r"Bootstrapping Graal\.+ in (?P<time>[0-9]+) ms") |
183 scoreMatcher = Matcher(time, {'const:name' : 'const:BootstrapTime', 'const:score' : 'time'}) | 183 scoreMatcher = Matcher(time, {'const:name' : 'const:BootstrapTime', 'const:score' : 'time'}) |
184 tests = [] | 184 tests = [] |
185 tests.append(Test("Bootstrap", "Bootstrap", ['-version'], successREs=[time], scoreMatchers=[scoreMatcher])) | 185 tests.append(Test("Bootstrap", "Bootstrap", ['-version'], successREs=[time], scoreMatchers=[scoreMatcher], ingoreVms=['client', 'server'])) |
186 tests.append(Test("Bootstrap-bigHeap", "Bootstrap-bigHeap", ['-version'], successREs=[time], scoreMatchers=[scoreMatcher], vmOpts=['-Xms2g'])) | 186 tests.append(Test("Bootstrap-bigHeap", "Bootstrap-bigHeap", ['-version'], successREs=[time], scoreMatchers=[scoreMatcher], vmOpts=['-Xms2g'], ingoreVms=['client', 'server'])) |
187 return tests | 187 return tests |
188 | 188 |
189 """ | 189 """ |
190 Encapsulates a single program that is a sanity test and/or a benchmark. | 190 Encapsulates a single program that is a sanity test and/or a benchmark. |
191 """ | 191 """ |
192 class Test: | 192 class Test: |
193 def __init__(self, name, group, cmd, successREs=[], failureREs=[], scoreMatchers=[], vmOpts=[], defaultCwd=None): | 193 def __init__(self, name, group, cmd, successREs=[], failureREs=[], scoreMatchers=[], vmOpts=[], defaultCwd=None, ingoreVms=[]): |
194 self.name = name | 194 self.name = name |
195 self.group = group | 195 self.group = group |
196 self.successREs = successREs | 196 self.successREs = successREs |
197 self.failureREs = failureREs + [re.compile(r"Exception occured in scope: ")] | 197 self.failureREs = failureREs + [re.compile(r"Exception occured in scope: ")] |
198 self.scoreMatchers = scoreMatchers | 198 self.scoreMatchers = scoreMatchers |
199 self.vmOpts = vmOpts | 199 self.vmOpts = vmOpts |
200 self.cmd = cmd | 200 self.cmd = cmd |
201 self.defaultCwd = defaultCwd | 201 self.defaultCwd = defaultCwd |
202 self.ingoreVms = ingoreVms; | |
203 | |
202 | 204 |
203 def __str__(self): | 205 def __str__(self): |
204 return self.name | 206 return self.name |
205 | 207 |
206 def test(self, vm, cwd=None, opts=[], vmbuild=None): | 208 def test(self, vm, cwd=None, opts=[], vmbuild=None): |
207 """ | 209 """ |
208 Run this program as a sanity test. | 210 Run this program as a sanity test. |
209 """ | 211 """ |
212 if (vm in self.ingoreVms): | |
213 return True; | |
210 if cwd is None: | 214 if cwd is None: |
211 cwd = self.defaultCwd | 215 cwd = self.defaultCwd |
212 parser = OutputParser(nonZeroIsFatal = False) | 216 parser = OutputParser(nonZeroIsFatal = False) |
213 jvmError = re.compile(r"(?P<jvmerror>([A-Z]:|/).*[/\\]hs_err_pid[0-9]+\.log)") | 217 jvmError = re.compile(r"(?P<jvmerror>([A-Z]:|/).*[/\\]hs_err_pid[0-9]+\.log)") |
214 parser.addMatcher(Matcher(jvmError, {'const:jvmError' : 'jvmerror'})) | 218 parser.addMatcher(Matcher(jvmError, {'const:jvmError' : 'jvmerror'})) |
244 | 248 |
245 def bench(self, vm, cwd=None, opts=[], vmbuild=None): | 249 def bench(self, vm, cwd=None, opts=[], vmbuild=None): |
246 """ | 250 """ |
247 Run this program as a benchmark. | 251 Run this program as a benchmark. |
248 """ | 252 """ |
253 if (vm in self.ingoreVms): | |
254 return {}; | |
249 if cwd is None: | 255 if cwd is None: |
250 cwd = self.defaultCwd | 256 cwd = self.defaultCwd |
251 parser = OutputParser(nonZeroIsFatal = False) | 257 parser = OutputParser(nonZeroIsFatal = False) |
252 | 258 |
253 for successRE in self.successREs: | 259 for successRE in self.successREs: |