diff --git a/compiler/rustc_resolve/src/build_reduced_graph.rs b/compiler/rustc_resolve/src/build_reduced_graph.rs index ab4861a59df61..3f4c260a496af 100644 --- a/compiler/rustc_resolve/src/build_reduced_graph.rs +++ b/compiler/rustc_resolve/src/build_reduced_graph.rs @@ -32,7 +32,7 @@ use tracing::debug; use crate::Namespace::{MacroNS, TypeNS, ValueNS}; use crate::def_collector::DefCollector; -use crate::error_helper::{OnUnknownData, StructCtor}; +use crate::diagnostics::impls::{OnUnknownData, StructCtor}; use crate::imports::{ImportData, ImportKind, NameResolution, NameResolutionRef}; use crate::macros::{MacroRulesDecl, MacroRulesScope, MacroRulesScopeRef}; use crate::ref_mut::CmCell; diff --git a/compiler/rustc_resolve/src/error_helper.rs b/compiler/rustc_resolve/src/diagnostics/impls.rs similarity index 100% rename from compiler/rustc_resolve/src/error_helper.rs rename to compiler/rustc_resolve/src/diagnostics/impls.rs diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics/mod.rs similarity index 99% rename from compiler/rustc_resolve/src/diagnostics.rs rename to compiler/rustc_resolve/src/diagnostics/mod.rs index 3e2cb94dc2858..9de2a682dc1fd 100644 --- a/compiler/rustc_resolve/src/diagnostics.rs +++ b/compiler/rustc_resolve/src/diagnostics/mod.rs @@ -10,6 +10,8 @@ use rustc_span::{Ident, Span, Spanned, Symbol}; use crate::Res; use crate::late::{PatternSource, ResolvingRestrictionKind}; +pub(crate) mod impls; + #[derive(Diagnostic)] #[diag("can't use {$is_self -> [true] `Self` diff --git a/compiler/rustc_resolve/src/imports.rs b/compiler/rustc_resolve/src/imports.rs index 4daa549b1e109..d62bf538133f2 100644 --- a/compiler/rustc_resolve/src/imports.rs +++ b/compiler/rustc_resolve/src/imports.rs @@ -25,13 +25,13 @@ use rustc_span::{Ident, Span, Symbol, kw, sym}; use tracing::debug; use crate::Namespace::{self, *}; +use crate::diagnostics::impls::{OnUnknownData, Suggestion}; use crate::diagnostics::{ self, CannotBeReexportedCratePublic, CannotBeReexportedCratePublicNS, CannotBeReexportedPrivate, CannotBeReexportedPrivateNS, CannotDetermineImportResolution, CannotGlobImportAllCrates, ConsiderAddingMacroExport, ConsiderMarkingAsPub, ConsiderMarkingAsPubCrate, }; -use crate::error_helper::{OnUnknownData, Suggestion}; use crate::ref_mut::{CmCell, CmRefCell}; use crate::{ AmbiguityError, BindingKey, CmResolver, Decl, DeclData, DeclKind, Determinacy, Finalize, diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs index 42ac352df6bfb..4874ccdcd460a 100644 --- a/compiler/rustc_resolve/src/late/diagnostics.rs +++ b/compiler/rustc_resolve/src/late/diagnostics.rs @@ -32,7 +32,7 @@ use thin_vec::{ThinVec, thin_vec}; use tracing::debug; use super::NoConstantGenericsReason; -use crate::error_helper::{ImportSuggestion, LabelSuggestion, TypoSuggestion}; +use crate::diagnostics::impls::{ImportSuggestion, LabelSuggestion, TypoSuggestion}; use crate::late::{ AliasPossibility, LateResolutionVisitor, LifetimeBinderKind, LifetimeRes, LifetimeRibKind, LifetimeUseSet, QSelf, RibKind, diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index 649d56fb11edf..13576c24e6c08 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -29,7 +29,6 @@ use std::{fmt, mem}; use diagnostics::{ParamKindInEnumDiscriminant, ParamKindInNonTrivialAnonConst}; use effective_visibilities::EffectiveVisibilitiesVisitor; -use error_helper::{ImportSuggestion, LabelSuggestion, StructCtor, Suggestion}; use hygiene::Macros20NormalizedSyntaxContext; use imports::{Import, ImportData, ImportKind, NameResolution, PendingDecl}; use late::{ @@ -77,7 +76,9 @@ use rustc_span::{DUMMY_SP, Ident, Span, Symbol, kw, sym}; use smallvec::{SmallVec, smallvec}; use tracing::{debug, instrument}; -use crate::error_helper::OnUnknownData; +use crate::diagnostics::impls::{ + ImportSuggestion, LabelSuggestion, OnUnknownData, StructCtor, Suggestion, +}; use crate::imports::NameResolutionRef; use crate::ref_mut::{CmCell, CmRefCell}; @@ -86,7 +87,6 @@ mod check_unused; mod def_collector; mod diagnostics; mod effective_visibilities; -mod error_helper; mod ident; mod imports; mod late; diff --git a/library/panic_unwind/src/gcc.rs b/library/panic_unwind/src/gcc.rs index 5f95870069dc5..4f580cb552806 100644 --- a/library/panic_unwind/src/gcc.rs +++ b/library/panic_unwind/src/gcc.rs @@ -60,11 +60,7 @@ struct Exception { pub(crate) unsafe fn panic(data: Box) -> u32 { let exception = Box::new(Exception { - _uwe: uw::_Unwind_Exception { - exception_class: RUST_EXCEPTION_CLASS, - exception_cleanup: Some(exception_cleanup), - private: [core::ptr::null(); uw::unwinder_private_data_size], - }, + _uwe: uw::_Unwind_Exception::new(RUST_EXCEPTION_CLASS, Some(exception_cleanup)), canary: &CANARY, cause: data, }); diff --git a/library/std/src/sys/stdio/windows.rs b/library/std/src/sys/stdio/windows.rs index 475a0592528b4..89976847d3817 100644 --- a/library/std/src/sys/stdio/windows.rs +++ b/library/std/src/sys/stdio/windows.rs @@ -278,7 +278,7 @@ impl io::Read for Stdin { Ok(bytes_copied) } else if buf.len() - bytes_copied < 4 { // Not enough space to get a UTF-8 byte. We will use the incomplete UTF8. - let mut utf16_buf = [MaybeUninit::new(0); 1]; + let mut utf16_buf = [MaybeUninit::new(0); 2]; // Read one u16 character. let read = read_u16s_fixup_surrogates(handle, &mut utf16_buf, 1, &mut self.surrogate)?; // Read bytes, using the (now-empty) self.incomplete_utf8 as extra space. diff --git a/library/unwind/Cargo.toml b/library/unwind/Cargo.toml index 1293c469d11c1..628b9d5e8c3ec 100644 --- a/library/unwind/Cargo.toml +++ b/library/unwind/Cargo.toml @@ -4,9 +4,6 @@ version = "0.0.0" license = "MIT OR Apache-2.0" repository = "https://github.com/rust-lang/rust.git" edition = "2024" -include = [ - '/libunwind/*', -] [lib] test = false diff --git a/library/unwind/src/lib.rs b/library/unwind/src/lib.rs index 02201f43c08ce..dce3ea8c7e007 100644 --- a/library/unwind/src/lib.rs +++ b/library/unwind/src/lib.rs @@ -33,14 +33,11 @@ cfg_select! { target_os = "solid_asp3", all(target_vendor = "fortanix", target_env = "sgx"), all(target_os = "wasi", panic = "unwind"), + target_os = "xous", ) => { mod libunwind; pub use libunwind::*; } - target_os = "xous" => { - mod unwinding; - pub use unwinding::*; - } target_family = "wasm" => { mod wasm; pub use wasm::*; diff --git a/library/unwind/src/libunwind.rs b/library/unwind/src/libunwind.rs index 6967c7f7f2665..f8d66fc7a2e3e 100644 --- a/library/unwind/src/libunwind.rs +++ b/library/unwind/src/libunwind.rs @@ -2,6 +2,12 @@ use core::ffi::{c_int, c_void}; +// Use the unwinding crate as unwinder on Xous +#[cfg(target_os = "xous")] +pub use unwinding::custom_eh_frame_finder::{ + EhFrameFinder, FrameInfo, FrameInfoKind, set_custom_eh_frame_finder, +}; + #[repr(C)] #[derive(Debug, Copy, Clone, PartialEq)] pub enum _Unwind_Reason_Code { @@ -24,73 +30,51 @@ pub type _Unwind_Ptr = *const u8; pub type _Unwind_Trace_Fn = extern "C" fn(ctx: *mut _Unwind_Context, arg: *mut c_void) -> _Unwind_Reason_Code; -#[cfg(target_arch = "x86")] -pub const unwinder_private_data_size: usize = 5; - -#[cfg(all(target_arch = "x86_64", not(any(target_os = "windows", target_os = "cygwin"))))] -pub const unwinder_private_data_size: usize = 2; - -#[cfg(all(target_arch = "x86_64", any(target_os = "windows", target_os = "cygwin")))] -pub const unwinder_private_data_size: usize = 6; - -#[cfg(all(target_arch = "arm", not(target_vendor = "apple")))] -pub const unwinder_private_data_size: usize = 20; - -#[cfg(all(target_arch = "arm", target_vendor = "apple"))] -pub const unwinder_private_data_size: usize = 5; - -#[cfg(all(target_arch = "aarch64", target_pointer_width = "64", not(target_os = "windows")))] -pub const unwinder_private_data_size: usize = 2; - -#[cfg(all(target_arch = "aarch64", target_pointer_width = "64", target_os = "windows"))] -pub const unwinder_private_data_size: usize = 6; - -#[cfg(all(target_arch = "aarch64", target_pointer_width = "32"))] -pub const unwinder_private_data_size: usize = 5; - -#[cfg(target_arch = "m68k")] -pub const unwinder_private_data_size: usize = 2; - -#[cfg(any(target_arch = "mips", target_arch = "mips32r6"))] -pub const unwinder_private_data_size: usize = 2; - -#[cfg(target_arch = "csky")] -pub const unwinder_private_data_size: usize = 2; - -#[cfg(any(target_arch = "mips64", target_arch = "mips64r6"))] -pub const unwinder_private_data_size: usize = 2; - -#[cfg(any(target_arch = "powerpc", target_arch = "powerpc64"))] -pub const unwinder_private_data_size: usize = 2; - -#[cfg(target_arch = "s390x")] -pub const unwinder_private_data_size: usize = 2; - -#[cfg(any(target_arch = "sparc", target_arch = "sparc64"))] -pub const unwinder_private_data_size: usize = 2; - -#[cfg(any(target_arch = "riscv64", target_arch = "riscv32"))] -pub const unwinder_private_data_size: usize = 2; - -#[cfg(all(target_family = "wasm", target_os = "emscripten"))] -pub const unwinder_private_data_size: usize = 20; - -#[cfg(all(target_arch = "wasm32", any(target_os = "linux", target_os = "wasi")))] -pub const unwinder_private_data_size: usize = 2; - -#[cfg(target_arch = "hexagon")] -pub const unwinder_private_data_size: usize = 5; - -#[cfg(any(target_arch = "loongarch32", target_arch = "loongarch64"))] -pub const unwinder_private_data_size: usize = 2; +const unwinder_private_data_size: usize = cfg_select! { + target_arch = "x86" => 5, + all(target_arch = "x86_64", not(any(target_os = "windows", target_os = "cygwin"))) => 2, + all(target_arch = "x86_64", any(target_os = "windows", target_os = "cygwin")) => 6, + all(target_arch = "arm", not(target_vendor = "apple")) => 20, + all(target_arch = "arm", target_vendor = "apple") => 5, + all(target_arch = "aarch64", target_pointer_width = "64", not(target_os = "windows")) => 2, + all(target_arch = "aarch64", target_pointer_width = "64", target_os = "windows") => 6, + all(target_arch = "aarch64", target_pointer_width = "32") => 5, + target_arch = "m68k" => 2, + any(target_arch = "mips", target_arch = "mips32r6") => 2, + target_arch = "csky" => 2, + any(target_arch = "mips64", target_arch = "mips64r6") => 2, + any(target_arch = "powerpc", target_arch = "powerpc64") => 2, + target_arch = "s390x" => 2, + any(target_arch = "sparc", target_arch = "sparc64") => 2, + any(target_arch = "riscv64", target_arch = "riscv32") => 2, + all(target_family = "wasm", target_os = "emscripten") => 20, + all(target_arch = "wasm32", any(target_os = "linux", target_os = "wasi")) => 2, + target_arch = "hexagon" => 5, + any(target_arch = "loongarch32", target_arch = "loongarch64") => 2, +}; #[repr(C)] pub struct _Unwind_Exception { pub exception_class: _Unwind_Exception_Class, pub exception_cleanup: _Unwind_Exception_Cleanup_Fn, - pub private: [_Unwind_Word; unwinder_private_data_size], + private: [_Unwind_Word; unwinder_private_data_size], +} + +impl _Unwind_Exception { + pub fn new( + exception_class: _Unwind_Exception_Class, + exception_cleanup: _Unwind_Exception_Cleanup_Fn, + ) -> Self { + Self { exception_class, exception_cleanup, private: [core::ptr::null(); _] } + } } +// Check the size of _Unwind_Exception against the source of thruth when using the unwinding crate. +#[cfg(target_os = "xous")] +const _: () = { + assert!(size_of::() == size_of::<_Unwind_Exception>()); +}; + pub enum _Unwind_Context {} pub type _Unwind_Exception_Cleanup_Fn = @@ -105,10 +89,7 @@ pub type _Unwind_Exception_Cleanup_Fn = // rustc_codegen_ssa::src::back::symbol_export, rustc_middle::middle::exported_symbols // and RFC 2841 #[cfg_attr( - all( - feature = "llvm-libunwind", - any(target_os = "fuchsia", target_os = "linux", target_os = "xous") - ), + all(feature = "llvm-libunwind", any(target_os = "fuchsia", target_os = "linux")), link(name = "unwind", kind = "static", modifiers = "-bundle") )] // Explicitly link the `unwind` library on WASI targets. @@ -144,7 +125,7 @@ cfg_select! { pub const _UA_END_OF_STACK: c_int = 16; #[cfg_attr( - all(feature = "llvm-libunwind", any(target_os = "fuchsia", target_os = "linux", target_os = "xous")), + all(feature = "llvm-libunwind", any(target_os = "fuchsia", target_os = "linux")), link(name = "unwind", kind = "static", modifiers = "-bundle") )] unsafe extern "C" { @@ -203,7 +184,7 @@ cfg_select! { pub const UNWIND_IP_REG: c_int = 15; #[cfg_attr( - all(feature = "llvm-libunwind", any(target_os = "fuchsia", target_os = "linux", target_os = "xous")), + all(feature = "llvm-libunwind", any(target_os = "fuchsia", target_os = "linux")), link(name = "unwind", kind = "static", modifiers = "-bundle") )] unsafe extern "C" { @@ -283,14 +264,14 @@ cfg_select! { } _ => { #[cfg_attr( - all(feature = "llvm-libunwind", any(target_os = "fuchsia", target_os = "linux", target_os = "xous")), + all(feature = "llvm-libunwind", any(target_os = "fuchsia", target_os = "linux")), link(name = "unwind", kind = "static", modifiers = "-bundle") )] unsafe extern "C-unwind" { pub fn _Unwind_RaiseException(exception: *mut _Unwind_Exception) -> _Unwind_Reason_Code; } #[cfg_attr( - all(feature = "llvm-libunwind", any(target_os = "fuchsia", target_os = "linux", target_os = "xous")), + all(feature = "llvm-libunwind", any(target_os = "fuchsia", target_os = "linux")), link(name = "unwind", kind = "static", modifiers = "-bundle") )] unsafe extern "C" { diff --git a/library/unwind/src/unwinding.rs b/library/unwind/src/unwinding.rs deleted file mode 100644 index 36120bc868ee9..0000000000000 --- a/library/unwind/src/unwinding.rs +++ /dev/null @@ -1,100 +0,0 @@ -#![allow(nonstandard_style)] - -use core::ffi::{c_int, c_void}; - -pub type _Unwind_Action = c_int; - -pub const _UA_SEARCH_PHASE: c_int = 1; -pub const _UA_CLEANUP_PHASE: c_int = 2; -pub const _UA_HANDLER_FRAME: c_int = 4; -pub const _UA_FORCE_UNWIND: c_int = 8; -pub const _UA_END_OF_STACK: c_int = 16; - -#[repr(C)] -#[derive(Debug, Copy, Clone, PartialEq)] -pub enum _Unwind_Reason_Code { - _URC_NO_REASON = 0, - _URC_FOREIGN_EXCEPTION_CAUGHT = 1, - _URC_FATAL_PHASE2_ERROR = 2, - _URC_FATAL_PHASE1_ERROR = 3, - _URC_NORMAL_STOP = 4, - _URC_END_OF_STACK = 5, - _URC_HANDLER_FOUND = 6, - _URC_INSTALL_CONTEXT = 7, - _URC_CONTINUE_UNWIND = 8, - _URC_FAILURE = 9, // used only by ARM EHABI -} -pub use _Unwind_Reason_Code::*; -pub use unwinding::abi::{UnwindContext, UnwindException}; -pub enum _Unwind_Context {} - -pub use unwinding::custom_eh_frame_finder::{ - EhFrameFinder, FrameInfo, FrameInfoKind, set_custom_eh_frame_finder, -}; - -pub type _Unwind_Exception_Class = u64; -pub type _Unwind_Word = *const u8; -pub type _Unwind_Ptr = *const u8; - -pub const unwinder_private_data_size: usize = size_of::() - - size_of::<_Unwind_Exception_Class>() - - size_of::<_Unwind_Exception_Cleanup_Fn>(); - -pub type _Unwind_Exception_Cleanup_Fn = - Option; - -#[repr(C)] -pub struct _Unwind_Exception { - pub exception_class: _Unwind_Exception_Class, - pub exception_cleanup: _Unwind_Exception_Cleanup_Fn, - pub private: [_Unwind_Word; unwinder_private_data_size], -} - -pub unsafe fn _Unwind_GetDataRelBase(ctx: *mut _Unwind_Context) -> _Unwind_Ptr { - let ctx = unsafe { &mut *(ctx as *mut UnwindContext<'_>) }; - unwinding::abi::_Unwind_GetDataRelBase(ctx) as _Unwind_Ptr -} - -pub unsafe fn _Unwind_GetTextRelBase(ctx: *mut _Unwind_Context) -> _Unwind_Ptr { - let ctx = unsafe { &mut *(ctx as *mut UnwindContext<'_>) }; - unwinding::abi::_Unwind_GetTextRelBase(ctx) as _Unwind_Ptr -} - -pub unsafe fn _Unwind_GetRegionStart(ctx: *mut _Unwind_Context) -> _Unwind_Ptr { - let ctx = unsafe { &mut *(ctx as *mut UnwindContext<'_>) }; - unwinding::abi::_Unwind_GetRegionStart(ctx) as _Unwind_Ptr -} - -pub unsafe fn _Unwind_SetGR(ctx: *mut _Unwind_Context, reg_index: c_int, value: _Unwind_Word) { - let ctx = unsafe { &mut *(ctx as *mut UnwindContext<'_>) }; - unwinding::abi::_Unwind_SetGR(ctx, reg_index, value as usize) -} - -pub unsafe fn _Unwind_SetIP(ctx: *mut _Unwind_Context, value: _Unwind_Word) { - let ctx = unsafe { &mut *(ctx as *mut UnwindContext<'_>) }; - unwinding::abi::_Unwind_SetIP(ctx, value as usize) -} - -pub unsafe fn _Unwind_GetIPInfo( - ctx: *mut _Unwind_Context, - ip_before_insn: *mut c_int, -) -> _Unwind_Word { - let ctx = unsafe { &mut *(ctx as *mut UnwindContext<'_>) }; - let ip_before_insn = unsafe { &mut *(ip_before_insn as *mut c_int) }; - unsafe { &*(unwinding::abi::_Unwind_GetIPInfo(ctx, ip_before_insn) as _Unwind_Word) } -} - -pub unsafe fn _Unwind_GetLanguageSpecificData(ctx: *mut _Unwind_Context) -> *mut c_void { - let ctx = unsafe { &mut *(ctx as *mut UnwindContext<'_>) }; - unwinding::abi::_Unwind_GetLanguageSpecificData(ctx) -} - -pub unsafe fn _Unwind_RaiseException(exception: *mut _Unwind_Exception) -> _Unwind_Reason_Code { - let exception = unsafe { &mut *(exception as *mut UnwindException) }; - unsafe { core::mem::transmute(unwinding::abi::_Unwind_RaiseException(exception)) } -} - -pub unsafe fn _Unwind_DeleteException(exception: *mut _Unwind_Exception) { - let exception = unsafe { &mut *(exception as *mut UnwindException) }; - unsafe { unwinding::abi::_Unwind_DeleteException(exception) } -} diff --git a/library/unwind/src/wasm.rs b/library/unwind/src/wasm.rs index 37d93bdbb67dd..ea958aad6b6d1 100644 --- a/library/unwind/src/wasm.rs +++ b/library/unwind/src/wasm.rs @@ -51,7 +51,16 @@ pub const unwinder_private_data_size: usize = 2; pub struct _Unwind_Exception { pub exception_class: _Unwind_Exception_Class, pub exception_cleanup: _Unwind_Exception_Cleanup_Fn, - pub private: [_Unwind_Word; unwinder_private_data_size], + private: [_Unwind_Word; unwinder_private_data_size], +} + +impl _Unwind_Exception { + pub fn new( + exception_class: _Unwind_Exception_Class, + exception_cleanup: _Unwind_Exception_Cleanup_Fn, + ) -> Self { + Self { exception_class, exception_cleanup, private: [core::ptr::null(); _] } + } } pub type _Unwind_Exception_Cleanup_Fn = diff --git a/src/bootstrap/mk/Makefile.in b/src/bootstrap/mk/Makefile.in index 4d4b37eec08b0..b265185a21413 100644 --- a/src/bootstrap/mk/Makefile.in +++ b/src/bootstrap/mk/Makefile.in @@ -106,7 +106,7 @@ prepare: SKIP_COMPILER := --skip=compiler SKIP_SRC := --skip=src TEST_SET1 := $(SKIP_COMPILER) $(SKIP_SRC) -TEST_SET2 := --skip=tests --skip=coverage-map --skip=coverage-run --skip=library --skip=tidyselftest +TEST_SET2 := --skip=tests --skip=library --skip=tidyselftest ## MSVC native builders diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index 61529da631a06..e363c292d9758 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -1975,6 +1975,12 @@ impl Step for Coverage { for mode in Self::ALL_MODES { run = run.alias(mode.as_str()); } + + // Allow `./x test --skip=tests` to properly skip the coverage tests, + // by not treating the `coverage-map` and `coverage-run` aliases as + // implied command-line arguments. + run = run.default_to_suites_only(); + run } @@ -2016,13 +2022,6 @@ impl Step for Coverage { !run.builder.config.skip.iter().any(|skip| skip == Path::new(mode.as_str())) }); - // FIXME(Zalathar): Make these commands skip all coverage tests, as expected: - // - `./x test --skip=tests` - // - `./x test --skip=tests/coverage` - // - `./x test --skip=coverage` - // Skip handling currently doesn't have a way to know that skipping the coverage - // suite should also skip the `coverage-map` and `coverage-run` aliases. - for mode in modes { run.builder.ensure(Coverage { compiler, target, mode }); } diff --git a/src/bootstrap/src/core/builder/cli_paths.rs b/src/bootstrap/src/core/builder/cli_paths.rs index 1b0caa980e1de..b645ce9f417ae 100644 --- a/src/bootstrap/src/core/builder/cli_paths.rs +++ b/src/bootstrap/src/core/builder/cli_paths.rs @@ -138,7 +138,8 @@ pub(crate) fn match_paths_to_steps_and_run( if paths.is_empty() || builder.config.include_default_paths { for StepExtra { desc, should_run } in &steps { if (desc.is_default_step_fn)(builder) { - desc.maybe_run(builder, should_run.paths.iter().cloned().collect()); + let default_pathsets = should_run.default_pathsets(); + desc.maybe_run(builder, default_pathsets); } } } diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test.snap index 60e8a219585c6..c167067fda67a 100644 --- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test.snap +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test.snap @@ -13,8 +13,6 @@ expression: test - Suite(test::tests/crashes) [Test] test::Coverage targets: [aarch64-unknown-linux-gnu] - - Set({test::coverage-map}) - - Set({test::coverage-run}) - Suite(test::tests/coverage) [Test] test::MirOpt targets: [aarch64-unknown-linux-gnu] diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_coverage.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_coverage.snap index fb83986445bea..942d71af123c8 100644 --- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_coverage.snap +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_coverage.snap @@ -11,10 +11,6 @@ expression: test --skip=coverage [Test] test::Crashes targets: [aarch64-unknown-linux-gnu] - Suite(test::tests/crashes) -[Test] test::Coverage - targets: [aarch64-unknown-linux-gnu] - - Set({test::coverage-map}) - - Set({test::coverage-run}) [Test] test::MirOpt targets: [aarch64-unknown-linux-gnu] - Suite(test::tests/mir-opt) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_coverage_map.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_coverage_map.snap new file mode 100644 index 0000000000000..53470834428a6 --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_coverage_map.snap @@ -0,0 +1,214 @@ +--- +source: src/bootstrap/src/core/builder/cli_paths/tests.rs +expression: test --skip=coverage-map +--- +[Test] test::Tidy + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/tidy}) +[Test] test::Ui + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/ui) +[Test] test::Crashes + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/crashes) +[Test] test::Coverage + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/coverage) +[Test] test::MirOpt + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/mir-opt) +[Test] test::CodegenLlvm + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/codegen-llvm) +[Test] test::CodegenUnits + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/codegen-units) +[Test] test::AssemblyLlvm + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/assembly-llvm) +[Test] test::Incremental + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/incremental) +[Test] test::Debuginfo + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/debuginfo) +[Test] test::UiFullDeps + targets: [x86_64-unknown-linux-gnu] + - Suite(test::tests/ui-fulldeps) +[Test] test::RustdocHtml + targets: [x86_64-unknown-linux-gnu] + - Suite(test::tests/rustdoc-html) +[Test] test::CoverageRunRustdoc + targets: [x86_64-unknown-linux-gnu] + - Suite(test::tests/coverage-run-rustdoc) +[Test] test::Pretty + targets: [x86_64-unknown-linux-gnu] + - Suite(test::tests/pretty) +[Test] test::CodegenCranelift + targets: [x86_64-unknown-linux-gnu] + - Set({test::compiler/rustc_codegen_cranelift}) +[Test] test::CodegenGCC + targets: [x86_64-unknown-linux-gnu] + - Set({test::compiler/rustc_codegen_gcc}) +[Test] test::Crate + targets: [aarch64-unknown-linux-gnu] + - Set({test::library/alloc}) + - Set({test::library/alloctests}) + - Set({test::library/compiler-builtins/compiler-builtins}) + - Set({test::library/core}) + - Set({test::library/coretests}) + - Set({test::library/panic_abort}) + - Set({test::library/panic_unwind}) + - Set({test::library/proc_macro}) + - Set({test::library/rustc-std-workspace-core}) + - Set({test::library/std}) + - Set({test::library/std_detect}) + - Set({test::library/sysroot}) + - Set({test::library/test}) + - Set({test::library/unwind}) +[Test] test::CrateLibrustc + targets: [x86_64-unknown-linux-gnu] + - Set({test::compiler}) + - Set({test::compiler/rustc}) + - Set({test::compiler/rustc_abi}) + - Set({test::compiler/rustc_arena}) + - Set({test::compiler/rustc_ast}) + - Set({test::compiler/rustc_ast_ir}) + - Set({test::compiler/rustc_ast_lowering}) + - Set({test::compiler/rustc_ast_passes}) + - Set({test::compiler/rustc_ast_pretty}) + - Set({test::compiler/rustc_attr_parsing}) + - Set({test::compiler/rustc_baked_icu_data}) + - Set({test::compiler/rustc_borrowck}) + - Set({test::compiler/rustc_builtin_macros}) + - Set({test::compiler/rustc_codegen_llvm}) + - Set({test::compiler/rustc_codegen_ssa}) + - Set({test::compiler/rustc_const_eval}) + - Set({test::compiler/rustc_data_structures}) + - Set({test::compiler/rustc_driver}) + - Set({test::compiler/rustc_driver_impl}) + - Set({test::compiler/rustc_error_codes}) + - Set({test::compiler/rustc_error_messages}) + - Set({test::compiler/rustc_errors}) + - Set({test::compiler/rustc_expand}) + - Set({test::compiler/rustc_feature}) + - Set({test::compiler/rustc_fs_util}) + - Set({test::compiler/rustc_graphviz}) + - Set({test::compiler/rustc_hashes}) + - Set({test::compiler/rustc_hir}) + - Set({test::compiler/rustc_hir_analysis}) + - Set({test::compiler/rustc_hir_id}) + - Set({test::compiler/rustc_hir_pretty}) + - Set({test::compiler/rustc_hir_typeck}) + - Set({test::compiler/rustc_incremental}) + - Set({test::compiler/rustc_index}) + - Set({test::compiler/rustc_index_macros}) + - Set({test::compiler/rustc_infer}) + - Set({test::compiler/rustc_interface}) + - Set({test::compiler/rustc_lexer}) + - Set({test::compiler/rustc_lint}) + - Set({test::compiler/rustc_lint_defs}) + - Set({test::compiler/rustc_llvm}) + - Set({test::compiler/rustc_log}) + - Set({test::compiler/rustc_macros}) + - Set({test::compiler/rustc_metadata}) + - Set({test::compiler/rustc_middle}) + - Set({test::compiler/rustc_mir_build}) + - Set({test::compiler/rustc_mir_dataflow}) + - Set({test::compiler/rustc_mir_transform}) + - Set({test::compiler/rustc_monomorphize}) + - Set({test::compiler/rustc_next_trait_solver}) + - Set({test::compiler/rustc_parse}) + - Set({test::compiler/rustc_parse_format}) + - Set({test::compiler/rustc_passes}) + - Set({test::compiler/rustc_pattern_analysis}) + - Set({test::compiler/rustc_privacy}) + - Set({test::compiler/rustc_proc_macro}) + - Set({test::compiler/rustc_public}) + - Set({test::compiler/rustc_public_bridge}) + - Set({test::compiler/rustc_query_impl}) + - Set({test::compiler/rustc_resolve}) + - Set({test::compiler/rustc_sanitizers}) + - Set({test::compiler/rustc_serialize}) + - Set({test::compiler/rustc_session}) + - Set({test::compiler/rustc_span}) + - Set({test::compiler/rustc_symbol_mangling}) + - Set({test::compiler/rustc_target}) + - Set({test::compiler/rustc_thread_pool}) + - Set({test::compiler/rustc_trait_selection}) + - Set({test::compiler/rustc_traits}) + - Set({test::compiler/rustc_transmute}) + - Set({test::compiler/rustc_ty_utils}) + - Set({test::compiler/rustc_type_ir}) + - Set({test::compiler/rustc_type_ir_macros}) + - Set({test::compiler/rustc_windows_rc}) +[Test] test::CrateRustdoc + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/librustdoc, test::src/tools/rustdoc}) +[Test] test::CrateRustdocJsonTypes + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/rustdoc-json-types}) +[Test] test::CrateBootstrap + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/coverage-dump}) + - Set({test::src/tools/jsondoclint}) + - Set({test::src/tools/replace-version-placeholder}) + - Set({test::tidyselftest}) +[Test] test::RemoteTestClientTests + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/remote-test-client}) +[Test] test::Linkcheck + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/linkchecker}) +[Test] test::TierCheck + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/tier-check}) +[Test] test::RustAnalyzer + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/rust-analyzer}) +[Test] test::ErrorIndex + targets: [x86_64-unknown-linux-gnu] + - Set({test::error-index}) + - Set({test::src/tools/error_index_generator}) +[Test] test::RustdocBook + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/doc/rustdoc}) +[Test] test::UnstableBook + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/doc/unstable-book}) +[Test] test::RustcBook + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/doc/rustc}) +[Test] test::StdarchVerify + targets: [x86_64-unknown-linux-gnu] + - Set({test::library/stdarch/crates/stdarch-verify}) +[Test] test::RustdocJSStd + targets: [x86_64-unknown-linux-gnu] + - Suite(test::tests/rustdoc-js-std) +[Test] test::RustdocJSNotStd + targets: [x86_64-unknown-linux-gnu] + - Suite(test::tests/rustdoc-js) +[Test] test::RustdocTheme + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/rustdoc-themes}) +[Test] test::RustdocUi + targets: [x86_64-unknown-linux-gnu] + - Suite(test::tests/rustdoc-ui) +[Test] test::RustdocJson + targets: [x86_64-unknown-linux-gnu] + - Suite(test::tests/rustdoc-json) +[Test] test::HtmlCheck + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/html-checker}) +[Test] test::RustInstaller + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/rust-installer}) +[Test] test::TestFloatParse + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/test-float-parse}) +[Test] test::RunMake + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/run-make) +[Test] test::RunMakeCargo + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/run-make-cargo) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_coverage_run.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_coverage_run.snap new file mode 100644 index 0000000000000..b4976a7f894f4 --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_coverage_run.snap @@ -0,0 +1,214 @@ +--- +source: src/bootstrap/src/core/builder/cli_paths/tests.rs +expression: test --skip=coverage-run +--- +[Test] test::Tidy + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/tidy}) +[Test] test::Ui + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/ui) +[Test] test::Crashes + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/crashes) +[Test] test::Coverage + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/coverage) +[Test] test::MirOpt + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/mir-opt) +[Test] test::CodegenLlvm + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/codegen-llvm) +[Test] test::CodegenUnits + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/codegen-units) +[Test] test::AssemblyLlvm + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/assembly-llvm) +[Test] test::Incremental + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/incremental) +[Test] test::Debuginfo + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/debuginfo) +[Test] test::UiFullDeps + targets: [x86_64-unknown-linux-gnu] + - Suite(test::tests/ui-fulldeps) +[Test] test::RustdocHtml + targets: [x86_64-unknown-linux-gnu] + - Suite(test::tests/rustdoc-html) +[Test] test::CoverageRunRustdoc + targets: [x86_64-unknown-linux-gnu] + - Suite(test::tests/coverage-run-rustdoc) +[Test] test::Pretty + targets: [x86_64-unknown-linux-gnu] + - Suite(test::tests/pretty) +[Test] test::CodegenCranelift + targets: [x86_64-unknown-linux-gnu] + - Set({test::compiler/rustc_codegen_cranelift}) +[Test] test::CodegenGCC + targets: [x86_64-unknown-linux-gnu] + - Set({test::compiler/rustc_codegen_gcc}) +[Test] test::Crate + targets: [aarch64-unknown-linux-gnu] + - Set({test::library/alloc}) + - Set({test::library/alloctests}) + - Set({test::library/compiler-builtins/compiler-builtins}) + - Set({test::library/core}) + - Set({test::library/coretests}) + - Set({test::library/panic_abort}) + - Set({test::library/panic_unwind}) + - Set({test::library/proc_macro}) + - Set({test::library/rustc-std-workspace-core}) + - Set({test::library/std}) + - Set({test::library/std_detect}) + - Set({test::library/sysroot}) + - Set({test::library/test}) + - Set({test::library/unwind}) +[Test] test::CrateLibrustc + targets: [x86_64-unknown-linux-gnu] + - Set({test::compiler}) + - Set({test::compiler/rustc}) + - Set({test::compiler/rustc_abi}) + - Set({test::compiler/rustc_arena}) + - Set({test::compiler/rustc_ast}) + - Set({test::compiler/rustc_ast_ir}) + - Set({test::compiler/rustc_ast_lowering}) + - Set({test::compiler/rustc_ast_passes}) + - Set({test::compiler/rustc_ast_pretty}) + - Set({test::compiler/rustc_attr_parsing}) + - Set({test::compiler/rustc_baked_icu_data}) + - Set({test::compiler/rustc_borrowck}) + - Set({test::compiler/rustc_builtin_macros}) + - Set({test::compiler/rustc_codegen_llvm}) + - Set({test::compiler/rustc_codegen_ssa}) + - Set({test::compiler/rustc_const_eval}) + - Set({test::compiler/rustc_data_structures}) + - Set({test::compiler/rustc_driver}) + - Set({test::compiler/rustc_driver_impl}) + - Set({test::compiler/rustc_error_codes}) + - Set({test::compiler/rustc_error_messages}) + - Set({test::compiler/rustc_errors}) + - Set({test::compiler/rustc_expand}) + - Set({test::compiler/rustc_feature}) + - Set({test::compiler/rustc_fs_util}) + - Set({test::compiler/rustc_graphviz}) + - Set({test::compiler/rustc_hashes}) + - Set({test::compiler/rustc_hir}) + - Set({test::compiler/rustc_hir_analysis}) + - Set({test::compiler/rustc_hir_id}) + - Set({test::compiler/rustc_hir_pretty}) + - Set({test::compiler/rustc_hir_typeck}) + - Set({test::compiler/rustc_incremental}) + - Set({test::compiler/rustc_index}) + - Set({test::compiler/rustc_index_macros}) + - Set({test::compiler/rustc_infer}) + - Set({test::compiler/rustc_interface}) + - Set({test::compiler/rustc_lexer}) + - Set({test::compiler/rustc_lint}) + - Set({test::compiler/rustc_lint_defs}) + - Set({test::compiler/rustc_llvm}) + - Set({test::compiler/rustc_log}) + - Set({test::compiler/rustc_macros}) + - Set({test::compiler/rustc_metadata}) + - Set({test::compiler/rustc_middle}) + - Set({test::compiler/rustc_mir_build}) + - Set({test::compiler/rustc_mir_dataflow}) + - Set({test::compiler/rustc_mir_transform}) + - Set({test::compiler/rustc_monomorphize}) + - Set({test::compiler/rustc_next_trait_solver}) + - Set({test::compiler/rustc_parse}) + - Set({test::compiler/rustc_parse_format}) + - Set({test::compiler/rustc_passes}) + - Set({test::compiler/rustc_pattern_analysis}) + - Set({test::compiler/rustc_privacy}) + - Set({test::compiler/rustc_proc_macro}) + - Set({test::compiler/rustc_public}) + - Set({test::compiler/rustc_public_bridge}) + - Set({test::compiler/rustc_query_impl}) + - Set({test::compiler/rustc_resolve}) + - Set({test::compiler/rustc_sanitizers}) + - Set({test::compiler/rustc_serialize}) + - Set({test::compiler/rustc_session}) + - Set({test::compiler/rustc_span}) + - Set({test::compiler/rustc_symbol_mangling}) + - Set({test::compiler/rustc_target}) + - Set({test::compiler/rustc_thread_pool}) + - Set({test::compiler/rustc_trait_selection}) + - Set({test::compiler/rustc_traits}) + - Set({test::compiler/rustc_transmute}) + - Set({test::compiler/rustc_ty_utils}) + - Set({test::compiler/rustc_type_ir}) + - Set({test::compiler/rustc_type_ir_macros}) + - Set({test::compiler/rustc_windows_rc}) +[Test] test::CrateRustdoc + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/librustdoc, test::src/tools/rustdoc}) +[Test] test::CrateRustdocJsonTypes + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/rustdoc-json-types}) +[Test] test::CrateBootstrap + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/coverage-dump}) + - Set({test::src/tools/jsondoclint}) + - Set({test::src/tools/replace-version-placeholder}) + - Set({test::tidyselftest}) +[Test] test::RemoteTestClientTests + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/remote-test-client}) +[Test] test::Linkcheck + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/linkchecker}) +[Test] test::TierCheck + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/tier-check}) +[Test] test::RustAnalyzer + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/rust-analyzer}) +[Test] test::ErrorIndex + targets: [x86_64-unknown-linux-gnu] + - Set({test::error-index}) + - Set({test::src/tools/error_index_generator}) +[Test] test::RustdocBook + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/doc/rustdoc}) +[Test] test::UnstableBook + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/doc/unstable-book}) +[Test] test::RustcBook + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/doc/rustc}) +[Test] test::StdarchVerify + targets: [x86_64-unknown-linux-gnu] + - Set({test::library/stdarch/crates/stdarch-verify}) +[Test] test::RustdocJSStd + targets: [x86_64-unknown-linux-gnu] + - Suite(test::tests/rustdoc-js-std) +[Test] test::RustdocJSNotStd + targets: [x86_64-unknown-linux-gnu] + - Suite(test::tests/rustdoc-js) +[Test] test::RustdocTheme + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/rustdoc-themes}) +[Test] test::RustdocUi + targets: [x86_64-unknown-linux-gnu] + - Suite(test::tests/rustdoc-ui) +[Test] test::RustdocJson + targets: [x86_64-unknown-linux-gnu] + - Suite(test::tests/rustdoc-json) +[Test] test::HtmlCheck + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/html-checker}) +[Test] test::RustInstaller + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/rust-installer}) +[Test] test::TestFloatParse + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/test-float-parse}) +[Test] test::RunMake + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/run-make) +[Test] test::RunMakeCargo + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/run-make-cargo) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests.snap index 3737272dd83a4..08674853caa42 100644 --- a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests.snap +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests.snap @@ -5,10 +5,6 @@ expression: test --skip=tests [Test] test::Tidy targets: [x86_64-unknown-linux-gnu] - Set({test::src/tools/tidy}) -[Test] test::Coverage - targets: [aarch64-unknown-linux-gnu] - - Set({test::coverage-map}) - - Set({test::coverage-run}) [Test] test::CodegenCranelift targets: [x86_64-unknown-linux-gnu] - Set({test::compiler/rustc_codegen_cranelift}) diff --git a/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests_coverage.snap b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests_coverage.snap new file mode 100644 index 0000000000000..9cc6f97bc193b --- /dev/null +++ b/src/bootstrap/src/core/builder/cli_paths/snapshots/x_test_skip_tests_coverage.snap @@ -0,0 +1,211 @@ +--- +source: src/bootstrap/src/core/builder/cli_paths/tests.rs +expression: test --skip=tests/coverage +--- +[Test] test::Tidy + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/tidy}) +[Test] test::Ui + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/ui) +[Test] test::Crashes + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/crashes) +[Test] test::MirOpt + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/mir-opt) +[Test] test::CodegenLlvm + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/codegen-llvm) +[Test] test::CodegenUnits + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/codegen-units) +[Test] test::AssemblyLlvm + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/assembly-llvm) +[Test] test::Incremental + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/incremental) +[Test] test::Debuginfo + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/debuginfo) +[Test] test::UiFullDeps + targets: [x86_64-unknown-linux-gnu] + - Suite(test::tests/ui-fulldeps) +[Test] test::RustdocHtml + targets: [x86_64-unknown-linux-gnu] + - Suite(test::tests/rustdoc-html) +[Test] test::CoverageRunRustdoc + targets: [x86_64-unknown-linux-gnu] + - Suite(test::tests/coverage-run-rustdoc) +[Test] test::Pretty + targets: [x86_64-unknown-linux-gnu] + - Suite(test::tests/pretty) +[Test] test::CodegenCranelift + targets: [x86_64-unknown-linux-gnu] + - Set({test::compiler/rustc_codegen_cranelift}) +[Test] test::CodegenGCC + targets: [x86_64-unknown-linux-gnu] + - Set({test::compiler/rustc_codegen_gcc}) +[Test] test::Crate + targets: [aarch64-unknown-linux-gnu] + - Set({test::library/alloc}) + - Set({test::library/alloctests}) + - Set({test::library/compiler-builtins/compiler-builtins}) + - Set({test::library/core}) + - Set({test::library/coretests}) + - Set({test::library/panic_abort}) + - Set({test::library/panic_unwind}) + - Set({test::library/proc_macro}) + - Set({test::library/rustc-std-workspace-core}) + - Set({test::library/std}) + - Set({test::library/std_detect}) + - Set({test::library/sysroot}) + - Set({test::library/test}) + - Set({test::library/unwind}) +[Test] test::CrateLibrustc + targets: [x86_64-unknown-linux-gnu] + - Set({test::compiler}) + - Set({test::compiler/rustc}) + - Set({test::compiler/rustc_abi}) + - Set({test::compiler/rustc_arena}) + - Set({test::compiler/rustc_ast}) + - Set({test::compiler/rustc_ast_ir}) + - Set({test::compiler/rustc_ast_lowering}) + - Set({test::compiler/rustc_ast_passes}) + - Set({test::compiler/rustc_ast_pretty}) + - Set({test::compiler/rustc_attr_parsing}) + - Set({test::compiler/rustc_baked_icu_data}) + - Set({test::compiler/rustc_borrowck}) + - Set({test::compiler/rustc_builtin_macros}) + - Set({test::compiler/rustc_codegen_llvm}) + - Set({test::compiler/rustc_codegen_ssa}) + - Set({test::compiler/rustc_const_eval}) + - Set({test::compiler/rustc_data_structures}) + - Set({test::compiler/rustc_driver}) + - Set({test::compiler/rustc_driver_impl}) + - Set({test::compiler/rustc_error_codes}) + - Set({test::compiler/rustc_error_messages}) + - Set({test::compiler/rustc_errors}) + - Set({test::compiler/rustc_expand}) + - Set({test::compiler/rustc_feature}) + - Set({test::compiler/rustc_fs_util}) + - Set({test::compiler/rustc_graphviz}) + - Set({test::compiler/rustc_hashes}) + - Set({test::compiler/rustc_hir}) + - Set({test::compiler/rustc_hir_analysis}) + - Set({test::compiler/rustc_hir_id}) + - Set({test::compiler/rustc_hir_pretty}) + - Set({test::compiler/rustc_hir_typeck}) + - Set({test::compiler/rustc_incremental}) + - Set({test::compiler/rustc_index}) + - Set({test::compiler/rustc_index_macros}) + - Set({test::compiler/rustc_infer}) + - Set({test::compiler/rustc_interface}) + - Set({test::compiler/rustc_lexer}) + - Set({test::compiler/rustc_lint}) + - Set({test::compiler/rustc_lint_defs}) + - Set({test::compiler/rustc_llvm}) + - Set({test::compiler/rustc_log}) + - Set({test::compiler/rustc_macros}) + - Set({test::compiler/rustc_metadata}) + - Set({test::compiler/rustc_middle}) + - Set({test::compiler/rustc_mir_build}) + - Set({test::compiler/rustc_mir_dataflow}) + - Set({test::compiler/rustc_mir_transform}) + - Set({test::compiler/rustc_monomorphize}) + - Set({test::compiler/rustc_next_trait_solver}) + - Set({test::compiler/rustc_parse}) + - Set({test::compiler/rustc_parse_format}) + - Set({test::compiler/rustc_passes}) + - Set({test::compiler/rustc_pattern_analysis}) + - Set({test::compiler/rustc_privacy}) + - Set({test::compiler/rustc_proc_macro}) + - Set({test::compiler/rustc_public}) + - Set({test::compiler/rustc_public_bridge}) + - Set({test::compiler/rustc_query_impl}) + - Set({test::compiler/rustc_resolve}) + - Set({test::compiler/rustc_sanitizers}) + - Set({test::compiler/rustc_serialize}) + - Set({test::compiler/rustc_session}) + - Set({test::compiler/rustc_span}) + - Set({test::compiler/rustc_symbol_mangling}) + - Set({test::compiler/rustc_target}) + - Set({test::compiler/rustc_thread_pool}) + - Set({test::compiler/rustc_trait_selection}) + - Set({test::compiler/rustc_traits}) + - Set({test::compiler/rustc_transmute}) + - Set({test::compiler/rustc_ty_utils}) + - Set({test::compiler/rustc_type_ir}) + - Set({test::compiler/rustc_type_ir_macros}) + - Set({test::compiler/rustc_windows_rc}) +[Test] test::CrateRustdoc + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/librustdoc, test::src/tools/rustdoc}) +[Test] test::CrateRustdocJsonTypes + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/rustdoc-json-types}) +[Test] test::CrateBootstrap + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/coverage-dump}) + - Set({test::src/tools/jsondoclint}) + - Set({test::src/tools/replace-version-placeholder}) + - Set({test::tidyselftest}) +[Test] test::RemoteTestClientTests + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/remote-test-client}) +[Test] test::Linkcheck + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/linkchecker}) +[Test] test::TierCheck + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/tier-check}) +[Test] test::RustAnalyzer + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/rust-analyzer}) +[Test] test::ErrorIndex + targets: [x86_64-unknown-linux-gnu] + - Set({test::error-index}) + - Set({test::src/tools/error_index_generator}) +[Test] test::RustdocBook + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/doc/rustdoc}) +[Test] test::UnstableBook + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/doc/unstable-book}) +[Test] test::RustcBook + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/doc/rustc}) +[Test] test::StdarchVerify + targets: [x86_64-unknown-linux-gnu] + - Set({test::library/stdarch/crates/stdarch-verify}) +[Test] test::RustdocJSStd + targets: [x86_64-unknown-linux-gnu] + - Suite(test::tests/rustdoc-js-std) +[Test] test::RustdocJSNotStd + targets: [x86_64-unknown-linux-gnu] + - Suite(test::tests/rustdoc-js) +[Test] test::RustdocTheme + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/rustdoc-themes}) +[Test] test::RustdocUi + targets: [x86_64-unknown-linux-gnu] + - Suite(test::tests/rustdoc-ui) +[Test] test::RustdocJson + targets: [x86_64-unknown-linux-gnu] + - Suite(test::tests/rustdoc-json) +[Test] test::HtmlCheck + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/html-checker}) +[Test] test::RustInstaller + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/rust-installer}) +[Test] test::TestFloatParse + targets: [x86_64-unknown-linux-gnu] + - Set({test::src/tools/test-float-parse}) +[Test] test::RunMake + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/run-make) +[Test] test::RunMakeCargo + targets: [aarch64-unknown-linux-gnu] + - Suite(test::tests/run-make-cargo) diff --git a/src/bootstrap/src/core/builder/cli_paths/tests.rs b/src/bootstrap/src/core/builder/cli_paths/tests.rs index 39293abd4fb94..40a37e5cf5631 100644 --- a/src/bootstrap/src/core/builder/cli_paths/tests.rs +++ b/src/bootstrap/src/core/builder/cli_paths/tests.rs @@ -173,13 +173,12 @@ declare_tests!( (x_test_rustdoc, "test rustdoc"), (x_test_rustdoc_html, "test rustdoc-html"), (x_test_skip_coverage, "test --skip=coverage"), - // FIXME(Zalathar): This doesn't skip the coverage-map or coverage-run tests. + (x_test_skip_coverage_map, "test --skip=coverage-map"), + (x_test_skip_coverage_run, "test --skip=coverage-run"), (x_test_skip_tests, "test --skip=tests"), + (x_test_skip_tests_coverage, "test --skip=tests/coverage"), // From `src/ci/docker/scripts/stage_2_test_set2.sh`. - ( - x_test_skip_tests_etc, - "test --skip=tests --skip=coverage-map --skip=coverage-run --skip=library --skip=tidyselftest" - ), + (x_test_skip_tests_etc, "test --skip=tests --skip=library --skip=tidyselftest"), (x_test_tests, "test tests"), (x_test_tests_skip_coverage, "test tests --skip=coverage"), (x_test_tests_ui, "test tests/ui"), diff --git a/src/bootstrap/src/core/builder/mod.rs b/src/bootstrap/src/core/builder/mod.rs index 0f68988a683cf..0d17f0f792a01 100644 --- a/src/bootstrap/src/core/builder/mod.rs +++ b/src/bootstrap/src/core/builder/mod.rs @@ -515,11 +515,13 @@ pub struct ShouldRun<'a> { // use a BTreeSet to maintain sort order paths: BTreeSet, + + default_to_suites_only: bool, } impl<'a> ShouldRun<'a> { fn new(builder: &'a Builder<'_>, kind: Kind) -> ShouldRun<'a> { - ShouldRun { builder, kind, paths: BTreeSet::new() } + ShouldRun { builder, kind, paths: BTreeSet::new(), default_to_suites_only: false } } /// Indicates it should run if the command-line selects the given crate or @@ -636,6 +638,28 @@ impl<'a> ShouldRun<'a> { } sets } + + /// When generating pathsets for a step that is being run "by default" + /// (i.e. when running bootstrap without an explicit command-line path), + /// discard any paths that were not registered as test suites. + /// + /// This is basically a hack to make path-based skipping work properly for + /// coverage tests, since otherwise the `coverage-map` and `coverage-run` + /// aliases would prevent `./x test --skip=tests` from skipping them. + pub(crate) fn default_to_suites_only(mut self) -> Self { + self.default_to_suites_only = true; + self + } + + /// When the corresponding step is run "by default" (without explicit command-line paths), + /// act as though the user had explicitly specified these paths. + fn default_pathsets(&self) -> Vec { + let mut default_pathsets = self.paths.iter().cloned().collect::>(); + if self.default_to_suites_only { + default_pathsets.retain(|p| matches!(p, PathSet::Suite(_))); + } + default_pathsets + } } #[derive(Debug, Copy, Clone, Eq, Hash, PartialEq, PartialOrd, Ord, ValueEnum)] diff --git a/src/ci/docker/scripts/stage_2_test_set2.sh b/src/ci/docker/scripts/stage_2_test_set2.sh index a47981c76d6d1..2c72992f66945 100755 --- a/src/ci/docker/scripts/stage_2_test_set2.sh +++ b/src/ci/docker/scripts/stage_2_test_set2.sh @@ -25,7 +25,5 @@ fi ${SKIP_TIDY:+$SKIP_TIDY} \ ${SKIP_RUST_ANALYZER:+$SKIP_RUST_ANALYZER} \ --skip tests \ - --skip coverage-map \ - --skip coverage-run \ --skip library \ --skip tidyselftest diff --git a/src/tools/compiletest/src/executor/deadline.rs b/src/tools/compiletest/src/executor/deadline.rs index 3536eff2fd80d..47e75c03f963e 100644 --- a/src/tools/compiletest/src/executor/deadline.rs +++ b/src/tools/compiletest/src/executor/deadline.rs @@ -79,7 +79,7 @@ impl<'a> DeadlineQueue<'a> { // Clear out entries that are past their deadline, but only invoke the // callback for tests that are still considered running. - while let Some(entry) = pop_front_if(&mut self.queue, |entry| entry.deadline <= now) { + while let Some(entry) = self.queue.pop_front_if(|entry| entry.deadline <= now) { if is_running(entry.id) { on_deadline_passed(entry.id, entry.test); } @@ -87,16 +87,10 @@ impl<'a> DeadlineQueue<'a> { // Also clear out any leading entries that are no longer running, even // if their deadline hasn't been reached. - while let Some(_) = pop_front_if(&mut self.queue, |entry| !is_running(entry.id)) {} + while self.queue.pop_front_if(|entry| !is_running(entry.id)).is_some() {} if let Some(front) = self.queue.front() { assert!(now < front.deadline); } } } - -/// FIXME(vec_deque_pop_if): Use `VecDeque::pop_front_if` when it is stable in bootstrap. -fn pop_front_if(queue: &mut VecDeque, predicate: impl FnOnce(&T) -> bool) -> Option { - let first = queue.front()?; - if predicate(first) { queue.pop_front() } else { None } -} diff --git a/src/tools/miri/tests/pass/panic/unwind_dwarf.rs b/src/tools/miri/tests/pass/panic/unwind_dwarf.rs index 3631c3f43aea9..255f4eea4f012 100644 --- a/src/tools/miri/tests/pass/panic/unwind_dwarf.rs +++ b/src/tools/miri/tests/pass/panic/unwind_dwarf.rs @@ -24,11 +24,7 @@ fn panic(data: Box) -> u32 { } let exception = Box::new(Exception { - _uwe: uw::_Unwind_Exception { - exception_class: miri_exception_class(), - exception_cleanup: Some(exception_cleanup), - private: [core::ptr::null(); uw::unwinder_private_data_size], - }, + _uwe: uw::_Unwind_Exception::new(miri_exception_class(), Some(exception_cleanup)), cause: data, }); let exception_param = Box::into_raw(exception) as *mut uw::_Unwind_Exception;