(self, **kwargs)
| 142 | return targets, gflags |
| 143 | |
| 144 | def arg_regex(self, **kwargs): |
| 145 | map2origin = dict( |
| 146 | x64 = "x86", |
| 147 | ppc64le = "ppc64", |
| 148 | aarch64 = "armhf", |
| 149 | clang = "gcc", |
| 150 | ) |
| 151 | march = self.march(); cc_name = self.cc_name() |
| 152 | map_march = map2origin.get(march, march) |
| 153 | map_cc = map2origin.get(cc_name, cc_name) |
| 154 | for key in ( |
| 155 | march, cc_name, map_march, map_cc, |
| 156 | march + '_' + cc_name, |
| 157 | map_march + '_' + cc_name, |
| 158 | march + '_' + map_cc, |
| 159 | map_march + '_' + map_cc, |
| 160 | ) : |
| 161 | regex = kwargs.pop(key, None) |
| 162 | if regex is not None: |
| 163 | break |
| 164 | if regex: |
| 165 | if isinstance(regex, dict): |
| 166 | for k, v in regex.items(): |
| 167 | if v[-1:] not in ')}$?\\.+*': |
| 168 | regex[k] = v + '$' |
| 169 | else: |
| 170 | assert(isinstance(regex, str)) |
| 171 | if regex[-1:] not in ')}$?\\.+*': |
| 172 | regex += '$' |
| 173 | return regex |
| 174 | |
| 175 | def expect(self, dispatch, baseline="", **kwargs): |
| 176 | match = self.arg_regex(**kwargs) |
no test coverage detected