()
| 50 | |
| 51 | |
| 52 | def main() -> int: |
| 53 | # Each argument is a mount of the same filesystem. Two independent mounts (an NFS export mounted twice with |
| 54 | # nosharecache, say) are two client caches over one server, so contending across them is a genuine multi-client |
| 55 | # check, not two views of one cache. With no arguments a temporary directory checks the local single-mount case. |
| 56 | if mounts := [Path(argument) for argument in sys.argv[1:]]: |
| 57 | for mount in mounts: |
| 58 | mount.mkdir(parents=True, exist_ok=True) |
| 59 | return _verify_across(mounts) |
| 60 | with TemporaryDirectory(prefix="filelock-verify-") as directory: |
| 61 | return _verify_across([Path(directory)]) |
| 62 | |
| 63 | |
| 64 | def _verify_across(mounts: list[Path]) -> int: |
no test coverage detected