()
| 585 | #[cfg(feature = "wasi-threads")] |
| 586 | #[test] |
| 587 | fn run_simple_with_wasi_threads() -> Result<()> { |
| 588 | // Skip this test on platforms that don't support threads. |
| 589 | if crate::threads::engine().is_none() { |
| 590 | return Ok(()); |
| 591 | } |
| 592 | // We expect to be able to run Wasm modules that do not have correct |
| 593 | // wasi-thread entry points or imported shared memory as long as no threads |
| 594 | // are spawned. |
| 595 | let wasm = build_wasm("tests/all/cli_tests/simple.wat")?; |
| 596 | let stdout = run_wasmtime(&[ |
| 597 | "run", |
| 598 | "-Wthreads", |
| 599 | "-Sthreads", |
| 600 | "-Ccache=n", |
| 601 | "--invoke", |
| 602 | "simple", |
| 603 | wasm.path().to_str().unwrap(), |
| 604 | "4", |
| 605 | ])?; |
| 606 | assert_eq!(stdout, "4\n"); |
| 607 | Ok(()) |
| 608 | } |
| 609 | |
| 610 | #[test] |
| 611 | fn wasm_flags() -> Result<()> { |
nothing calls this directly
no test coverage detected