From 81bff71d11103db08e112865f9fdd80c2d7593f9 Mon Sep 17 00:00:00 2001 From: Nick Fitzgerald Date: Mon, 25 Jul 2022 16:38:04 -0700 Subject: [PATCH] wasmtime: let serialization mismatch tests pass with `RUST_BACKTRACE=1` set (#4525) --- crates/wasmtime/src/module/serialization.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/crates/wasmtime/src/module/serialization.rs b/crates/wasmtime/src/module/serialization.rs index 4666763ea4..23c83e4d42 100644 --- a/crates/wasmtime/src/module/serialization.rs +++ b/crates/wasmtime/src/module/serialization.rs @@ -610,14 +610,13 @@ mod test { match serialized.into_module(&engine) { Ok(_) => unreachable!(), - Err(e) => assert_eq!( - format!("{:?}", e), + Err(e) => assert!(format!("{:?}", e).starts_with( "\ compilation settings of module incompatible with native host Caused by: setting \"avoid_div_traps\" is configured to Bool(false) which is not supported" - ), + )), } Ok(()) @@ -637,14 +636,13 @@ Caused by: match serialized.into_module(&engine) { Ok(_) => unreachable!(), - Err(e) => assert_eq!( - format!("{:?}", e), + Err(e) => assert!(format!("{:?}", e).starts_with( "\ compilation settings of module incompatible with native host Caused by: cannot test if target-specific flag \"not_a_flag\" is available at runtime", - ), + )), } Ok(())