Skip to content

Commit

Permalink
Auto merge of #13368 - oli-obk:bump_ui_test, r=flip1995
Browse files Browse the repository at this point in the history
Bump ui_test

This should give a bunch of ui improvements when lots of tests are running. Please lmk of any issues with it. Switching to `--quiet` should always avoid any issues, so there's a workaround if anything crops up. Also please check that this does not regress performance for you. It doesn't for me, but that doesn't mean much.

changelog: none
  • Loading branch information
bors committed Sep 10, 2024
2 parents 938f8ba + 1f13633 commit a53614a
Show file tree
Hide file tree
Showing 22 changed files with 96 additions and 30 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ anstream = "0.6.0"

[dev-dependencies]
cargo_metadata = "0.18.1"
ui_test = "0.25"
ui_test = "0.26.4"
regex = "1.5.5"
serde = { version = "1.0.145", features = ["derive"] }
serde_json = "1.0.122"
Expand Down
10 changes: 4 additions & 6 deletions tests/compile-test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ use test_utils::IS_RUSTC_TEST_SUITE;
use ui_test::custom_flags::rustfix::RustfixMode;
use ui_test::custom_flags::Flag;
use ui_test::spanned::Spanned;
use ui_test::test_result::TestRun;
use ui_test::{status_emitter, Args, CommandBuilder, Config, Match, OutputConflictHandling};

use std::collections::{BTreeMap, HashMap};
Expand Down Expand Up @@ -469,15 +468,14 @@ fn applicability_ord(applicability: &Applicability) -> u8 {
impl Flag for DiagnosticCollector {
fn post_test_action(
&self,
_config: &ui_test::per_test_config::TestConfig<'_>,
_cmd: &mut std::process::Command,
_config: &ui_test::per_test_config::TestConfig,
output: &std::process::Output,
_build_manager: &ui_test::build_manager::BuildManager<'_>,
) -> Result<Vec<TestRun>, ui_test::Errored> {
_build_manager: &ui_test::build_manager::BuildManager,
) -> Result<(), ui_test::Errored> {
if !output.stderr.is_empty() {
self.sender.send(output.stderr.clone()).unwrap();
}
Ok(Vec::new())
Ok(())
}

fn clone_inner(&self) -> Box<dyn Flag> {
Expand Down
3 changes: 1 addition & 2 deletions tests/ui/asm_syntax_not_x86.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//@ignore-target-i686
//@ignore-target-x86
//@ignore-target: i686 x86
//@needs-asm-support

#[warn(clippy::inline_asm_x86_intel_syntax)]
Expand Down
4 changes: 1 addition & 3 deletions tests/ui/asm_syntax_x86.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
//@revisions: i686 x86_64
//@[i686] only-target-i686
//@[x86_64] only-target-x86_64
//@only-target: i686 x86_64

#[warn(clippy::inline_asm_x86_intel_syntax)]
mod warn_intel {
Expand Down
70 changes: 70 additions & 0 deletions tests/ui/asm_syntax_x86.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
error: Intel x86 assembly syntax used
--> tests/ui/asm_syntax_x86.rs:8:9
|
LL | asm!("");
| ^^^^^^^^
|
= help: use AT&T x86 assembly syntax
= note: `-D clippy::inline-asm-x86-intel-syntax` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::inline_asm_x86_intel_syntax)]`

error: Intel x86 assembly syntax used
--> tests/ui/asm_syntax_x86.rs:10:9
|
LL | asm!("", options());
| ^^^^^^^^^^^^^^^^^^^
|
= help: use AT&T x86 assembly syntax

error: Intel x86 assembly syntax used
--> tests/ui/asm_syntax_x86.rs:12:9
|
LL | asm!("", options(nostack));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use AT&T x86 assembly syntax

error: Intel x86 assembly syntax used
--> tests/ui/asm_syntax_x86.rs:18:5
|
LL | global_asm!("");
| ^^^^^^^^^^^^^^^
|
= help: use AT&T x86 assembly syntax

error: Intel x86 assembly syntax used
--> tests/ui/asm_syntax_x86.rs:20:5
|
LL | global_asm!("", options());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use AT&T x86 assembly syntax

error: AT&T x86 assembly syntax used
--> tests/ui/asm_syntax_x86.rs:33:9
|
LL | asm!("", options(att_syntax));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use Intel x86 assembly syntax
= note: `-D clippy::inline-asm-x86-att-syntax` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::inline_asm_x86_att_syntax)]`

error: AT&T x86 assembly syntax used
--> tests/ui/asm_syntax_x86.rs:35:9
|
LL | asm!("", options(nostack, att_syntax));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use Intel x86 assembly syntax

error: AT&T x86 assembly syntax used
--> tests/ui/asm_syntax_x86.rs:41:5
|
LL | global_asm!("", options(att_syntax));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use Intel x86 assembly syntax

error: aborting due to 8 previous errors

3 changes: 1 addition & 2 deletions tests/ui/crashes/ice-7410.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//@compile-flags: -Clink-arg=-nostartfiles
//@ignore-target-apple
//@ignore-target-windows
//@ignore-target: apple windows

#![feature(lang_items, start, libc)]
#![no_std]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/crate_level_checks/entrypoint_recursion.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ignore-target-apple
//@ignore-target: apple

#![feature(rustc_attrs)]

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/crate_level_checks/no_std_main_recursion.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//@compile-flags: -Clink-arg=-nostartfiles
//@ignore-target-apple
//@ignore-target: apple

#![feature(lang_items, start, libc)]
#![no_std]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/def_id_nocore.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ignore-target-apple
//@ignore-target: apple

#![feature(no_core, lang_items, start)]
#![no_core]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/empty_loop_no_std.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//@compile-flags: -Clink-arg=-nostartfiles
//@ignore-target-apple
//@ignore-target: apple

#![warn(clippy::empty_loop)]
#![feature(lang_items, start, libc)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/enum_clike_unportable_variant.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ignore-32bit
//@ignore-bitwidth: 32

#![warn(clippy::enum_clike_unportable_variant)]
#![allow(unused, non_upper_case_globals)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/macro_use_imports.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//@aux-build:macro_use_helper.rs
//@aux-build:proc_macro_derive.rs

//@ignore-32bit
//@ignore-bitwidth: 32

#![allow(unused_imports, unreachable_code, unused_variables, dead_code, unused_attributes)]
#![allow(clippy::single_component_path_imports)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/macro_use_imports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//@aux-build:macro_use_helper.rs
//@aux-build:proc_macro_derive.rs

//@ignore-32bit
//@ignore-bitwidth: 32

#![allow(unused_imports, unreachable_code, unused_variables, dead_code, unused_attributes)]
#![allow(clippy::single_component_path_imports)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/macro_use_imports_expect.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//@aux-build:macro_rules.rs
//@aux-build:macro_use_helper.rs
//@aux-build:proc_macro_derive.rs
//@ignore-32bit
//@ignore-bitwidth: 32

#![allow(unused_imports, unreachable_code, unused_variables, dead_code, unused_attributes)]
#![allow(clippy::single_component_path_imports)]
Expand Down
3 changes: 2 additions & 1 deletion tests/ui/mixed_attributes_style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ mod issue_12530 {
#![allow(dead_code)]
}
}
/// Nested mod //~ ERROR: item has both inner and outer attributes
/// Nested mod
//~^ ERROR: item has both inner and outer attributes
#[allow(unused)]
mod nest_mod_2 {
#![allow(unused)]
Expand Down
3 changes: 2 additions & 1 deletion tests/ui/mixed_attributes_style.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@ error: item has both inner and outer attributes
--> tests/ui/mixed_attributes_style.rs:85:5
|
LL | / /// Nested mod
LL | |
LL | | #[allow(unused)]
LL | | mod nest_mod_2 {
LL | | #![allow(unused)]
| |_________________________^

error: item has both inner and outer attributes
--> tests/ui/mixed_attributes_style.rs:90:9
--> tests/ui/mixed_attributes_style.rs:91:9
|
LL | / #[allow(dead_code)]
LL | | mod inner_mod {
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/non_octal_unix_permissions.fixed
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ignore-target-windows
//@ignore-target: windows

#![warn(clippy::non_octal_unix_permissions)]
use std::fs::{DirBuilder, File, OpenOptions, Permissions};
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/non_octal_unix_permissions.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ignore-target-windows
//@ignore-target: windows

#![warn(clippy::non_octal_unix_permissions)]
use std::fs::{DirBuilder, File, OpenOptions, Permissions};
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/result_large_err.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ignore-32bit
//@ignore-bitwidth: 32

#![warn(clippy::result_large_err)]
#![allow(clippy::large_enum_variant)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/single_call_fn.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ignore-32bit
//@ignore-bitwidth: 32
//@aux-build:proc_macros.rs
#![allow(clippy::redundant_closure_call, unused)]
#![warn(clippy::single_call_fn)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/transmute_32bit.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ignore-64bit
//@ignore-bitwidth: 64

#[warn(clippy::wrong_transmute)]
fn main() {
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/transmute_64bit.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ignore-32bit
//@ignore-bitwidth: 32

#[warn(clippy::wrong_transmute)]
fn main() {
Expand Down

0 comments on commit a53614a

Please sign in to comment.