diff --git a/implants/golem/src/main.rs b/implants/golem/src/main.rs index 4ad98eddd..df4c45c09 100644 --- a/implants/golem/src/main.rs +++ b/implants/golem/src/main.rs @@ -33,20 +33,21 @@ async fn run_tomes(tomes: Vec) -> Result> { } 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) } diff --git a/implants/golem/tests/cli.rs b/implants/golem/tests/cli.rs index 1e417e0e2..db8819b51 100644 --- a/implants/golem/tests/cli.rs +++ b/implants/golem/tests/cli.rs @@ -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(()) diff --git a/implants/lib/eldritch/src/sys/get_os_impl.rs b/implants/lib/eldritch/src/sys/get_os_impl.rs index aef68e4cf..b7a1a67c2 100644 --- a/implants/lib/eldritch/src/sys/get_os_impl.rs +++ b/implants/lib/eldritch/src/sys/get_os_impl.rs @@ -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(()) } }