(self, dispatch, baseline="", **kwargs)
| 173 | return regex |
| 174 | |
| 175 | def expect(self, dispatch, baseline="", **kwargs): |
| 176 | match = self.arg_regex(**kwargs) |
| 177 | if match is None: |
| 178 | return |
| 179 | opt = self.nopt( |
| 180 | cpu_baseline=baseline, cpu_dispatch=dispatch, |
| 181 | trap_files=kwargs.get("trap_files", ""), |
| 182 | trap_flags=kwargs.get("trap_flags", "") |
| 183 | ) |
| 184 | features = ' '.join(opt.cpu_dispatch_names()) |
| 185 | if not match: |
| 186 | if len(features) != 0: |
| 187 | raise AssertionError( |
| 188 | 'expected empty features, not "%s"' % features |
| 189 | ) |
| 190 | return |
| 191 | if not re.match(match, features, re.IGNORECASE): |
| 192 | raise AssertionError( |
| 193 | 'dispatch features "%s" not match "%s"' % (features, match) |
| 194 | ) |
| 195 | |
| 196 | def expect_baseline(self, baseline, dispatch="", **kwargs): |
| 197 | match = self.arg_regex(**kwargs) |
no test coverage detected