Skip to content

Commit b038641

Browse files
committed
Use #[ignore] rather than commenting out for disabling sysroot tests
1 parent fdaf804 commit b038641

File tree

1 file changed

+25
-22
lines changed

1 file changed

+25
-22
lines changed

patches/0028-sysroot_tests-Disable-long-running-tests.patch

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,41 @@ diff --git a/coretests/tests/slice.rs b/coretests/tests/slice.rs
1111
index 8402833..84592e0 100644
1212
--- a/coretests/tests/slice.rs
1313
+++ b/coretests/tests/slice.rs
14-
@@ -1809,6 +1809,7 @@ fn sort_unstable() {
15-
}
16-
}
14+
@@ -1619,7 +1619,7 @@ fn brute_force_rotate_test_1() {
1715

18-
+/*
1916
#[test]
2017
#[cfg(not(target_arch = "wasm32"))]
21-
#[cfg_attr(miri, ignore)] // Miri is too slow
22-
@@ -1914,6 +1915,7 @@ fn select_nth_unstable() {
23-
v.select_nth_unstable(0);
24-
assert!(v == [0xDEADBEEF]);
25-
}
26-
+*/
18+
-#[cfg_attr(miri, ignore)] // Miri is too slow
19+
+#[ignore] // Miri is too slow
20+
fn select_nth_unstable() {
21+
use core::cmp::Ordering::{Equal, Greater, Less};
2722

28-
#[test]
29-
#[should_panic(expected = "index 0 greater than length of slice")]
30-
@@ -2462,6 +2462,7 @@ take_tests! {
31-
#[cfg(not(miri))] // unused in Miri
23+
@@ -2303,14 +2303,14 @@ split_off_tests! {
3224
const EMPTY_MAX: &'static [()] = &[(); usize::MAX];
3325

34-
+/*
3526
// can't be a constant due to const mutability rules
36-
#[cfg(not(miri))] // unused in Miri
27+
-#[cfg(not(miri))] // unused in Miri
28+
+#[cfg(any())] // unused in Miri
3729
macro_rules! empty_max_mut {
38-
@@ -2485,6 +2486,7 @@ take_tests! {
39-
(split_off_mut_oob_max_range_to_inclusive, (..=usize::MAX), None, empty_max_mut!()),
40-
(split_off_mut_in_bounds_max_range_from, (usize::MAX..), Some(&mut [] as _), empty_max_mut!()),
30+
() => {
31+
&mut [(); usize::MAX] as _
32+
};
4133
}
42-
+*/
4334

44-
#[test]
45-
fn test_slice_from_ptr_range() {
35+
-#[cfg(not(miri))] // Comparing usize::MAX many elements takes forever in Miri (and in rustc without optimizations)
36+
+#[cfg(any())] // Comparing usize::MAX many elements takes forever in Miri (and in rustc without optimizations)
37+
split_off_tests! {
38+
slice: &[(); usize::MAX], method: split_off,
39+
(split_off_in_bounds_max_range_to, (..usize::MAX), Some(EMPTY_MAX), &[(); 0]),
40+
@@ -2318,7 +2318,7 @@ split_off_tests! {
41+
(split_off_in_bounds_max_range_from, (usize::MAX..), Some(&[] as _), EMPTY_MAX),
42+
}
43+
44+
-#[cfg(not(miri))] // Comparing usize::MAX many elements takes forever in Miri (and in rustc without optimizations)
45+
+#[cfg(any())] // Comparing usize::MAX many elements takes forever in Miri (and in rustc without optimizations)
46+
split_off_tests! {
47+
slice: &mut [(); usize::MAX], method: split_off_mut,
48+
(split_off_mut_in_bounds_max_range_to, (..usize::MAX), Some(empty_max_mut!()), &mut [(); 0]),
4649
diff --git a/alloctests/tests/sort/tests.rs b/alloctests/tests/sort/tests.rs
4750
index d321f8d..8b2040a 100644
4851
--- a/alloctests/tests/sort/tests.rs

0 commit comments

Comments
 (0)