(self, baseline, dispatch="", **kwargs)
| 194 | ) |
| 195 | |
| 196 | def expect_baseline(self, baseline, dispatch="", **kwargs): |
| 197 | match = self.arg_regex(**kwargs) |
| 198 | if match is None: |
| 199 | return |
| 200 | opt = self.nopt( |
| 201 | cpu_baseline=baseline, cpu_dispatch=dispatch, |
| 202 | trap_files=kwargs.get("trap_files", ""), |
| 203 | trap_flags=kwargs.get("trap_flags", "") |
| 204 | ) |
| 205 | features = ' '.join(opt.cpu_baseline_names()) |
| 206 | if not match: |
| 207 | if len(features) != 0: |
| 208 | raise AssertionError( |
| 209 | 'expected empty features, not "%s"' % features |
| 210 | ) |
| 211 | return |
| 212 | if not re.match(match, features, re.IGNORECASE): |
| 213 | raise AssertionError( |
| 214 | 'baseline features "%s" not match "%s"' % (features, match) |
| 215 | ) |
| 216 | |
| 217 | def expect_flags(self, baseline, dispatch="", **kwargs): |
| 218 | match = self.arg_regex(**kwargs) |
no test coverage detected