(case, raw, name, tool, environment)
| 197 | |
| 198 | |
| 199 | def merge_profile(case, raw, name, tool, environment): |
| 200 | output = case / (name + ".profdata") |
| 201 | result = {"raw": str(raw), "merged": str(output), "valid": False} |
| 202 | if not regular_nonempty(raw): |
| 203 | result["failure"] = "raw profile is not a regular nonempty file" |
| 204 | return result |
| 205 | command = [tool, "merge", "--instr", "--output=" + str(output), str(raw)] |
| 206 | result["process"] = run_process(case, "merge-" + name, command, environment) |
| 207 | process = result["process"] |
| 208 | result["valid"] = (not process["failure"] and process["returncode"] == 0 |
| 209 | and regular_nonempty(output)) |
| 210 | if not result["valid"]: |
| 211 | result["failure"] = "matching llvm-profdata did not validate the raw profile" |
| 212 | return result |
| 213 | |
| 214 | |
| 215 | def classify(case, mode, process, obstacle): |
no test coverage detected