MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / reactor_root

Function reactor_root

atomic-cli/tests/provenance_rpc_sink.rs:42–51  ·  view source on GitHub ↗

The Reactor checkout that owns the atomicd daemon binary. This test file lives in /atomic-cli/tests, so ../../reactor resolves to the sibling workspace checkout; `ATOMIC_REACTOR_ROOT` overrides that for non-sibling checkouts. `None` means no Reactor checkout exists (e.g. CI runners) and the RPC-sink suite skips — the daemon binary is not buildable from this workspace alone.

()

Source from the content-addressed store, hash-verified

40/// (e.g. CI runners) and the RPC-sink suite skips — the daemon binary is
41/// not buildable from this workspace alone.
42fn reactor_root() -> Option<PathBuf> {
43 if let Some(root) = std::env::var_os("ATOMIC_REACTOR_ROOT") {
44 let root = PathBuf::from(root);
45 return root.join("Cargo.toml").exists().then_some(root);
46 }
47 let root = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../../reactor");
48 root.canonicalize()
49 .ok()
50 .filter(|root| root.join("Cargo.toml").exists())
51}
52
53/// Discover an actual daemon target for the optional external transport tests.
54/// The mandatory trait-flow test serves the same handlers in this process.

Callers 1

daemon_binaryFunction · 0.85

Calls 3

canonicalizeMethod · 0.80
existsMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected