Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions implants/golem/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,21 @@ async fn run_tomes(tomes: Vec<ParsedTome>) -> Result<Vec<String>> {
}

let mut result = Vec::new();
let mut errors = Vec::new();
for runtime in &mut runtimes {
runtime.finish().await;

for msg in runtime.messages() {
match msg {
Message::ReportText(m) => result.push(m.text()),
Message::ReportError(m) => {
return Err(anyhow!("{}", m.error));
}
Message::ReportError(m) => errors.push(m.error),
_ => {}
}
}
}

if !errors.is_empty() {
return Err(anyhow!("{:?}", errors));
}
Ok(result)
}

Expand Down
2 changes: 1 addition & 1 deletion implants/golem/tests/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fn test_golem_main_syntax_fail() -> anyhow::Result<()> {

cmd.arg(format!("{GOLEM_CLI_TEST_DIR}syntax_fail.tome"));
cmd.assert().failure().stderr(predicate::str::contains(
r#"Parse error: unexpected string literal "win" here"#.to_string(),
r#"Parse error: unexpected string literal"#.to_string(),
));

Ok(())
Expand Down
3 changes: 3 additions & 0 deletions implants/lib/eldritch/src/sys/get_os_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ mod tests {
let test_heap = Heap::new();
let res = get_os(&test_heap)?;
println!("{}", res);
#[cfg(target_arch = "x86_64")]
assert!(res.to_string().contains(r#""arch": "x86_64""#));
#[cfg(target_arch = "aarch64")]
assert!(res.to_string().contains(r#""arch": "arm64""#));
Ok(())
}
}