1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! Helpers shared by the tests that run the micromux binary.
//!
//! Every micromux a test starts keeps everything it shares per user in a private directory inside
//! the test's project: the port registry, cleanup state, control sockets, session locks, the shared
//! proxy, logs, and run-log spools.
//! A test therefore never registers with, waits for, shows up in, or writes over the developer's
//! own sessions.
use OsStr;
use ;
use Command;
/// The micromux binary under test.
pub const MICROMUX: &str = env!;
/// The private state directory of the test project in `project`.
///
/// It lives inside the project's temporary directory, so it goes away with the test, and every
/// command run for the same project shares it.
/// The name is short because control sockets live inside it, and macOS limits socket paths to 104
/// bytes under its long temporary directory.
/// A command running `program`, with every micromux it starts keeping its state in `project`'s
/// private state directory.
///
/// `program` is usually the micromux binary, but may be a shell that runs it.
/// A command running the micromux binary under test with `project`'s private state.