A lightweight WebAssembly runtime that is fast, secure, and standards-compliant
Optimize `tests/wasi.rs` CI time a bit (#14678)
Alex Crichtoncdb65782829d
diff --git a/tests/wasi.rs b/tests/wasi.rsindex 785ea3c21e..cec12fc863 100644--- a/tests/wasi.rs+++ b/tests/wasi.rs@@ -77,8 +77,14 @@ fn find_tests(path: &Path, adapted_dir: &Arc<TempDir>, trials: &mut Vec<Trial>)},));- // Additionally test wasip1 modules through the wasip2 adapter.- if cfg!(feature = "component-model") && path.iter().any(|p| p == "wasm32-wasip1") {+ // Additionally test wasip1 modules through the wasip2 adapter. This+ // is skipped when running under emulation (e.g. QEMU) where compiling+ // all these modules is quite slow and the adapter's behavior isn't+ // architecture-specific.+ if cfg!(feature = "component-model")+ && path.iter().any(|p| p == "wasm32-wasip1")+ && wasmtime_test_util::cargo_test_runner().is_none()+ {let should_fail = KNOWN_FAILURES.contains(&test_name.as_str())|| KNOWN_ADAPTER_FAILURES.contains(&test_name.as_str());trials.push(Trial::test(@@ -163,6 +169,10 @@ fn execute(spec_path: &Path, wasm: &Path) -> Result<()> {cmd.arg("run");}}+ // Try to optimize tests for one-shot performance: no need to+ // cache since that's just extra hashing, no need to optimize+ // since these'll run quickly anyway, etc.+ cmd.arg("-Ccache=n").arg("-Oopt-level=0");for dir in dirs {cmd.arg("--dir");let src = parent_dir.join(&dir);