Skip to content

Commit 5521ed9

Browse files
committed
only run clock_nanosleep tests on support target_os
1 parent dbe9e85 commit 5521ed9

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/tools/miri/tests/pass-dep/libc/libc-time.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
//@ignore-target: windows # no libc time APIs on Windows
22
//@compile-flags: -Zmiri-disable-isolation
3-
use std::{env, mem, ptr};
43
use std::time::{Duration, Instant};
4+
use std::{env, mem, ptr};
55

66
fn main() {
77
test_clocks();
88
test_posix_gettimeofday();
99
test_nanosleep();
10-
test_clock_nanosleep_absolute();
11-
test_clock_nanosleep_relative();
10+
#[cfg(any(
11+
target_os = "freebsd",
12+
target_os = "linux",
13+
target_os = "android",
14+
target_os = "solaris",
15+
target_os = "illumos"
16+
))]
17+
{
18+
test_clock_nanosleep_absolute();
19+
test_clock_nanosleep_relative();
20+
}
1221
test_localtime_r_epoch();
1322
test_localtime_r_gmt();
1423
test_localtime_r_pst();

0 commit comments

Comments
 (0)