Skip to content

Commit 93ccab2

Browse files
authored
Merge pull request #607 from ratmice/wasm32_tests
Disable two tests which require filesystem under wasm32-wasip2
2 parents 7ac8791 + fde31be commit 93ccab2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lrlex/src/lib/ctbuilder.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1444,7 +1444,10 @@ fn indent(indent: &str, s: &str) -> String {
14441444
format!("{indent}{}\n", s.trim_end_matches('\n')).replace('\n', &format!("\n{}", indent))
14451445
}
14461446

1447-
#[cfg(test)]
1447+
// It isn't clear to me why this test isn't working on wasm32,
1448+
// as the `workspace_runner` should allow access to `OUT_DIR`
1449+
// perhaps it is related to absolute paths
1450+
#[cfg(all(not(target_arch = "wasm32"), test))]
14481451
mod test {
14491452
use std::fs::File;
14501453
use std::io::Write;

lrpar/cttests/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ fn test_expect() {
352352
// various files from across the project workspace.
353353
//
354354
// Wasi's filesystem access is sandboxed by default.
355+
#[cfg(all(not(target_arch = "wasm32"), test))]
355356
#[test]
356357
fn test_grmtools_section_files() {
357358
use glob::glob;

0 commit comments

Comments
 (0)