(self, case, directory, code)
| 168 | "count": exact[0]["counts"][0]} |
| 169 | |
| 170 | def reduce(self, case, directory, code): |
| 171 | # The pinned reducer invokes exactly one profdata reader per admitted raw |
| 172 | # profile here. Reserve those nested processes before launching its group. |
| 173 | self.inventory(directory) |
| 174 | for name in RAW_NAMES: |
| 175 | self.charge("reserved_reducer_process", name) |
| 176 | argv = [sys.executable, self.inputs["driver"]["path"], "--reduce-worker", |
| 177 | "--helper", self.inputs["helper"]["path"], |
| 178 | "--reducer", self.inputs["reducer"]["path"], |
| 179 | "--suite-dir", str(directory), "--profdata", self.tool, |
| 180 | "--runner-returncode", str(code)] |
| 181 | record = self.run(case, "actual-reducer", argv, self.environment, success=True) |
| 182 | rows = json.loads(self.log(case, record, "stdout")) |
| 183 | require(isinstance(rows, dict) and set(rows) == {TEST, "*"}, "unexpected actual reducer rows") |
| 184 | for row in rows.values(): |
| 185 | require(isinstance(row, dict) and set(row) == {"status", "reason", "names_count"} |
| 186 | and row["status"] in ("complete", "incomplete") |
| 187 | and isinstance(row["reason"], str) and type(row["names_count"]) is int |
| 188 | and row["names_count"] >= 0, "invalid actual reducer response") |
| 189 | return rows |
| 190 | |
| 191 | def body(self, stdout, code): |
| 192 | rows = re.findall(r"(?m)^ ([A-Za-z_][A-Za-z0-9_]*)[ \t]+(PASS|FAIL|SKIP)\b", stdout) |
no test coverage detected