Skip to content

Commit

Permalink
Disable some tests, and adjust timeouts when running under qemu
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottt committed Sep 11, 2023
1 parent f20df79 commit f45b108
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 7 additions & 5 deletions crates/wasi/src/preview2/pipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,16 +469,18 @@ mod test {
use super::*;
use tokio::io::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt};

#[cfg(target_arch = "riscv64")]
// This is a gross way to handle CI running under qemu for non-x86 architectures.
#[cfg(not(target_arch = "x86_64"))]
const TEST_ITERATIONS: usize = 10;

#[cfg(target_arch = "riscv64")]
const REASONABLE_DURATION: std::time::Duration = std::time::Duration::from_millis(100);
// This is a gross way to handle CI running under qemu for non-x86 architectures.
#[cfg(not(target_arch = "x86_64"))]
const REASONABLE_DURATION: std::time::Duration = std::time::Duration::from_millis(200);

#[cfg(not(target_arch = "riscv64"))]
#[cfg(target_arch = "x86_64")]
const TEST_ITERATIONS: usize = 100;

#[cfg(not(target_arch = "riscv64"))]
#[cfg(target_arch = "x86_64")]
const REASONABLE_DURATION: std::time::Duration = std::time::Duration::from_millis(10);

async fn resolves_immediately<F, O>(fut: F) -> O
Expand Down
4 changes: 4 additions & 0 deletions crates/wasi/src/preview2/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,12 +338,16 @@ mod test {
)
}

// This test doesn't work under qemu because of the use of fork in the test helper.
#[test]
#[cfg_attr(not(target = "x86_64"), ignore)]
fn test_async_fd_stdin() {
test_stdin_by_forking(super::stdin);
}

// This test doesn't work under qemu because of the use of fork in the test helper.
#[test]
#[cfg_attr(not(target = "x86_64"), ignore)]
fn test_worker_thread_stdin() {
test_stdin_by_forking(super::worker_thread_stdin::stdin);
}
Expand Down

0 comments on commit f45b108

Please sign in to comment.