From fde31beb0e09cf43264843129eecdb2602fef741 Mon Sep 17 00:00:00 2001 From: matt rice Date: Wed, 22 Oct 2025 06:21:54 -0700 Subject: [PATCH] Disable two tests which require filesystem under wasm32-wasip2 --- lrlex/src/lib/ctbuilder.rs | 5 ++++- lrpar/cttests/src/lib.rs | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lrlex/src/lib/ctbuilder.rs b/lrlex/src/lib/ctbuilder.rs index 044a04b08..63c74066e 100644 --- a/lrlex/src/lib/ctbuilder.rs +++ b/lrlex/src/lib/ctbuilder.rs @@ -1444,7 +1444,10 @@ fn indent(indent: &str, s: &str) -> String { format!("{indent}{}\n", s.trim_end_matches('\n')).replace('\n', &format!("\n{}", indent)) } -#[cfg(test)] +// It isn't clear to me why this test isn't working on wasm32, +// as the `workspace_runner` should allow access to `OUT_DIR` +// perhaps it is related to absolute paths +#[cfg(all(not(target_arch = "wasm32"), test))] mod test { use std::fs::File; use std::io::Write; diff --git a/lrpar/cttests/src/lib.rs b/lrpar/cttests/src/lib.rs index 4bcacf56c..6b0eeb61f 100644 --- a/lrpar/cttests/src/lib.rs +++ b/lrpar/cttests/src/lib.rs @@ -352,6 +352,7 @@ fn test_expect() { // various files from across the project workspace. // // Wasi's filesystem access is sandboxed by default. +#[cfg(all(not(target_arch = "wasm32"), test))] #[test] fn test_grmtools_section_files() { use glob::glob;