diff --git a/tests/integration/expected/fib.hir b/tests/integration/expected/fib.hir index e4d110806..3e84891d2 100644 --- a/tests/integration/expected/fib.hir +++ b/tests/integration/expected/fib.hir @@ -6,8 +6,6 @@ ;; Global Variables (global (export #__stack_pointer) (id 0) (type i32) (const 0)) - (global (export #gv1) (id 1) (type i32) (const 0)) - (global (export #gv2) (id 2) (type i32) (const 0)) ;; Functions (func (export #fib) (param i32) (result i32) diff --git a/tests/integration/expected/fib.wat b/tests/integration/expected/fib.wat index 580653ea1..03bc415ed 100644 --- a/tests/integration/expected/fib.wat +++ b/tests/integration/expected/fib.wat @@ -30,10 +30,6 @@ ) (memory (;0;) 16) (global $__stack_pointer (;0;) (mut i32) i32.const 1048576) - (global (;1;) i32 i32.const 1048576) - (global (;2;) i32 i32.const 1048576) (export "memory" (memory 0)) (export "fib" (func $fib)) - (export "__data_end" (global 1)) - (export "__heap_base" (global 2)) ) \ No newline at end of file diff --git a/tests/integration/src/cargo_proj/mod.rs b/tests/integration/src/cargo_proj/mod.rs index d58feef00..52e2d2865 100644 --- a/tests/integration/src/cargo_proj/mod.rs +++ b/tests/integration/src/cargo_proj/mod.rs @@ -251,14 +251,23 @@ impl ProjectBuilder { } fn skip_rust_compilation(&self, artifact_name: &str) -> bool { - let computed_artifact_path = self + let artifact_path_wasm32_wasi = self + .root() + .join("target") + .join("wasm32-wasip1") + .join("release") + .join(artifact_name) + .with_extension("wasm"); + let artifact_path_wasm32_unknown = self .root() .join("target") .join("wasm32-unknown-unknown") .join("release") .join(artifact_name) .with_extension("wasm"); - if std::env::var("SKIP_RUST").is_ok() && computed_artifact_path.exists() { + let artifact_exists = + artifact_path_wasm32_unknown.exists() || artifact_path_wasm32_wasi.exists(); + if std::env::var("SKIP_RUST").is_ok() && (artifact_exists) { eprintln!("Skipping Rust compilation"); true } else { diff --git a/tests/integration/src/compiler_test.rs b/tests/integration/src/compiler_test.rs index 3ed91aa43..8f8f42be5 100644 --- a/tests/integration/src/compiler_test.rs +++ b/tests/integration/src/compiler_test.rs @@ -629,7 +629,7 @@ impl CompilerTestBuilder { let config = CargoTest::new(artifact_name, project_dir) .with_build_alloc(true) .with_target_dir(target_dir) - .with_target("wasm32-unknown-unknown") + .with_target("wasm32-wasip1") .with_entrypoint(entrypoint); CompilerTestBuilder::new(config) }