diff --git a/library/test/src/tests.rs b/library/test/src/tests.rs index 8aba486bbf4..9b9c5205686 100644 --- a/library/test/src/tests.rs +++ b/library/test/src/tests.rs @@ -65,6 +65,8 @@ fn one_ignored_one_unignored_test() -> Vec { compile_fail: false, no_run: false, test_type: TestType::Unknown, + #[cfg(bootstrap)] + allow_fail: false, }, testfn: DynTestFn(Box::new(move || {})), }, @@ -76,6 +78,8 @@ fn one_ignored_one_unignored_test() -> Vec { compile_fail: false, no_run: false, test_type: TestType::Unknown, + #[cfg(bootstrap)] + allow_fail: false, }, testfn: DynTestFn(Box::new(move || {})), }, @@ -95,6 +99,8 @@ pub fn do_not_run_ignored_tests() { compile_fail: false, no_run: false, test_type: TestType::Unknown, + #[cfg(bootstrap)] + allow_fail: false, }, testfn: DynTestFn(Box::new(f)), }; @@ -115,6 +121,8 @@ pub fn ignored_tests_result_in_ignored() { compile_fail: false, no_run: false, test_type: TestType::Unknown, + #[cfg(bootstrap)] + allow_fail: false, }, testfn: DynTestFn(Box::new(f)), }; @@ -139,6 +147,8 @@ fn test_should_panic() { compile_fail: false, no_run: false, test_type: TestType::Unknown, + #[cfg(bootstrap)] + allow_fail: false, }, testfn: DynTestFn(Box::new(f)), }; @@ -163,6 +173,8 @@ fn test_should_panic_good_message() { compile_fail: false, no_run: false, test_type: TestType::Unknown, + #[cfg(bootstrap)] + allow_fail: false, }, testfn: DynTestFn(Box::new(f)), }; @@ -192,6 +204,8 @@ fn test_should_panic_bad_message() { compile_fail: false, no_run: false, test_type: TestType::Unknown, + #[cfg(bootstrap)] + allow_fail: false, }, testfn: DynTestFn(Box::new(f)), }; @@ -225,6 +239,8 @@ fn test_should_panic_non_string_message_type() { compile_fail: false, no_run: false, test_type: TestType::Unknown, + #[cfg(bootstrap)] + allow_fail: false, }, testfn: DynTestFn(Box::new(f)), }; @@ -250,6 +266,8 @@ fn test_should_panic_but_succeeds() { compile_fail: false, no_run: false, test_type: TestType::Unknown, + #[cfg(bootstrap)] + allow_fail: false, }, testfn: DynTestFn(Box::new(f)), }; @@ -283,6 +301,8 @@ fn report_time_test_template(report_time: bool) -> Option { compile_fail: false, no_run: false, test_type: TestType::Unknown, + #[cfg(bootstrap)] + allow_fail: false, }, testfn: DynTestFn(Box::new(f)), }; @@ -317,6 +337,8 @@ fn time_test_failure_template(test_type: TestType) -> TestResult { compile_fail: false, no_run: false, test_type, + #[cfg(bootstrap)] + allow_fail: false, }, testfn: DynTestFn(Box::new(f)), }; @@ -355,6 +377,8 @@ fn typed_test_desc(test_type: TestType) -> TestDesc { compile_fail: false, no_run: false, test_type, + #[cfg(bootstrap)] + allow_fail: false, } } @@ -467,6 +491,8 @@ pub fn exclude_should_panic_option() { compile_fail: false, no_run: false, test_type: TestType::Unknown, + #[cfg(bootstrap)] + allow_fail: false, }, testfn: DynTestFn(Box::new(move || {})), }); @@ -490,6 +516,8 @@ pub fn exact_filter_match() { compile_fail: false, no_run: false, test_type: TestType::Unknown, + #[cfg(bootstrap)] + allow_fail: false, }, testfn: DynTestFn(Box::new(move || {})), }) @@ -578,6 +606,8 @@ fn sample_tests() -> Vec { compile_fail: false, no_run: false, test_type: TestType::Unknown, + #[cfg(bootstrap)] + allow_fail: false, }, testfn: DynTestFn(Box::new(testfn)), }; @@ -728,6 +758,8 @@ pub fn test_bench_no_iter() { compile_fail: false, no_run: false, test_type: TestType::Unknown, + #[cfg(bootstrap)] + allow_fail: false, }; crate::bench::benchmark(TestId(0), desc, tx, true, f); @@ -749,6 +781,8 @@ pub fn test_bench_iter() { compile_fail: false, no_run: false, test_type: TestType::Unknown, + #[cfg(bootstrap)] + allow_fail: false, }; crate::bench::benchmark(TestId(0), desc, tx, true, f); @@ -764,6 +798,8 @@ fn should_sort_failures_before_printing_them() { compile_fail: false, no_run: false, test_type: TestType::Unknown, + #[cfg(bootstrap)] + allow_fail: false, }; let test_b = TestDesc { @@ -773,6 +809,8 @@ fn should_sort_failures_before_printing_them() { compile_fail: false, no_run: false, test_type: TestType::Unknown, + #[cfg(bootstrap)] + allow_fail: false, }; let mut out = PrettyFormatter::new(OutputLocation::Raw(Vec::new()), false, 10, false, None); diff --git a/library/test/src/types.rs b/library/test/src/types.rs index 90aa5e8b4f9..43e5a10ebbe 100644 --- a/library/test/src/types.rs +++ b/library/test/src/types.rs @@ -121,6 +121,8 @@ pub struct TestDesc { pub compile_fail: bool, pub no_run: bool, pub test_type: TestType, + #[cfg(bootstrap)] + pub allow_fail: bool, } impl TestDesc { diff --git a/src/librustdoc/doctest.rs b/src/librustdoc/doctest.rs index f34580c107f..b9432b204ee 100644 --- a/src/librustdoc/doctest.rs +++ b/src/librustdoc/doctest.rs @@ -954,6 +954,8 @@ impl Tester for Collector { compile_fail: config.compile_fail, no_run, test_type: test::TestType::DocTest, + #[cfg(bootstrap)] + allow_fail: false, }, testfn: test::DynTestFn(box move || { let report_unused_externs = |uext| { diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index 603b0b68a42..da7a19139c6 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -925,6 +925,8 @@ pub fn make_test_description( compile_fail: false, no_run: false, test_type: test::TestType::Unknown, + #[cfg(bootstrap)] + allow_fail: false, } }