Skip to content

Commit 6ada73b

Browse files
mockersfjames7132
authored andcommitted
ignore nanosec precision tests on apple m1 (bevyengine#6377)
# Objective - Some tests are very flaky on a m1 - m1 currently have a 41 ns precision ## Solution - Do not run tests that compare a `Duration` or a `f64` on a m1 (and m2)
1 parent 1fa37b5 commit 6ada73b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

crates/bevy_time/src/time.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,9 @@ mod tests {
442442
}
443443

444444
#[test]
445+
// Don't run on a m1 as they have a 41ns precision
446+
// https://github.com/rust-lang/rust/issues/91417
447+
#[cfg(not(all(target_arch = "aarch64", target_vendor = "apple")))]
445448
fn update_test() {
446449
let start_instant = Instant::now();
447450
let mut time = Time::new(start_instant);
@@ -574,6 +577,9 @@ mod tests {
574577
}
575578

576579
#[test]
580+
// Don't run on a m1 as they have a 41ns precision
581+
// https://github.com/rust-lang/rust/issues/91417
582+
#[cfg(not(all(target_arch = "aarch64", target_vendor = "apple")))]
577583
fn relative_speed_test() {
578584
let start_instant = Instant::now();
579585
let mut time = Time::new(start_instant);
@@ -676,6 +682,9 @@ mod tests {
676682
}
677683

678684
#[test]
685+
// Don't run on a m1 as they have a 41ns precision
686+
// https://github.com/rust-lang/rust/issues/91417
687+
#[cfg(not(all(target_arch = "aarch64", target_vendor = "apple")))]
679688
fn pause_test() {
680689
let start_instant = Instant::now();
681690
let mut time = Time::new(start_instant);

0 commit comments

Comments
 (0)