Documentation
¶
Overview ¶
Command gcpemu-testdir lets a test harness with no OS file lock of its own, such as the console's Playwright e2e, keep its Instances in Test data dirs (ADR 0077, #1035). It is a development tool, never released.
gcpemu-testdir hold <dir>
takes the owner lock of the Test data dir dir, creating dir if need be, prints the line "held" once it has it, and keeps it until its stdin closes. The harness gives it a pipe for stdin, which closes when the harness ends however it ends, so the lock is held for exactly as long as the harness lives. It ignores SIGINT and SIGTERM, which reach it with the rest of its process group while the harness still stops its Instance.
gcpemu-testdir reclaim <root>
is a run-start reclaim (ADR 0057): it reclaims every Test data dir whose test has ended, those directly under root among them, with their Instances' containers, networks and volumes, for up to reclaimTimeout; a later reclaim finishes what it did not. While the container runtime does not answer, it keeps the dirs under root that no object records, and fails.