(value)
| 80 | |
| 81 | |
| 82 | def fresh_output(value): |
| 83 | requested = Path(value).absolute() |
| 84 | if os.path.lexists(requested): |
| 85 | raise Infrastructure("test output already exists; preserving caller data") |
| 86 | parent = requested.parent.resolve(strict=True) |
| 87 | if not parent.is_dir(): |
| 88 | raise Infrastructure("test output parent is not a directory") |
| 89 | result = parent / requested.name |
| 90 | if any(character in str(result) for character in ("\n", "\r", "%")): |
| 91 | raise Infrastructure("unsupported LLVM evidence path characters") |
| 92 | result.mkdir(mode=0o700) |
| 93 | return result |
| 94 | |
| 95 | |
| 96 | def main(): |
no test coverage detected