Documentation
¶
Overview ¶
Package testbin builds the swarm and swarm-fake-agent binaries once per test binary run, shared by the skeleton, protocol, and e2e integration suites that each need a real subprocess to shim/agent against.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KillProcessesOf ¶ added in v0.17.8
func KillProcessesOf(exes ...string)
KillProcessesOf SIGKILLs every process other than this one whose executable is one of exes. A test run calls it last with the binaries it built (and its own test binary, which agents re-exec): shims deliberately outlive their daemon, so nothing else ends a session a test forgot to kill. Exe paths are unique per run, so no other run's processes match. Linux only: without /proc it does nothing.
Types ¶
type Binaries ¶
Binaries resolves the swarm and swarm-fake-agent binary paths, building them exactly once (guarded by an internal sync.Once) no matter how many times Build is called.
func (*Binaries) Build ¶
Build compiles cmd/swarm and cmd/swarm-fake-agent into a fresh temp dir named tmpPrefix*, once. On a build failure every call (not just the first) invokes onFail with the recorded error, so each caller keeps its own skip-vs-fail policy instead of Build choosing one for everybody.