use std::error::Error;
use std::process::Command;
#[test]
fn capability_contract_dependency_graph_has_no_beamr() -> Result<(), Box<dyn Error>> {
let output = Command::new(env!("CARGO"))
.args([
"tree",
"--package",
"frame-capability",
"--edges",
"normal",
"--prefix",
"none",
])
.output()?;
if !output.status.success() {
return Err(format!(
"cargo tree failed: {}",
String::from_utf8_lossy(&output.stderr)
)
.into());
}
let graph = String::from_utf8(output.stdout)?;
assert!(
!graph.lines().any(|line| line.starts_with("beamr ")),
"frame-capability dependency graph crossed the beamr fence:\n{graph}"
);
Ok(())
}