Skip to content

Commit 20ebbf4

Browse files
Replace ignore-everything with only-arch
Combining revisions with only-arch allows specifying that a test only applies to a handful of targets. This allows removing a large amount of repetition in the test suite for tests that do not benefit. The revisions are suboptimal for this for some tests, so they aren't preferred in those cases.
1 parent 040bc34 commit 20ebbf4

15 files changed

+74
-184
lines changed

tests/codegen/abi-main-signature-16bit-c-int.rs

+4-16
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,10 @@
22
// entry point. It must match C's `int main(int, char **)`.
33

44
// This test is for targets with 16bit c_int only.
5-
// ignore-aarch64
6-
// ignore-arm
7-
// ignore-asmjs
8-
// ignore-hexagon
9-
// ignore-mips
10-
// ignore-mips64
11-
// ignore-powerpc
12-
// ignore-powerpc64
13-
// ignore-riscv64
14-
// ignore-s390x
15-
// ignore-sparc
16-
// ignore-sparc64
17-
// ignore-wasm32
18-
// ignore-x86
19-
// ignore-x86_64
20-
// ignore-loongarch64
5+
// revisions: avr msp
6+
//[avr] only-avr
7+
//[msp] only-msp430
8+
219

2210
fn main() {
2311
}

tests/codegen/global_asm.rs

+3-21
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,6 @@
1-
// ignore-aarch64
2-
// ignore-arm
3-
// ignore-avr
4-
// ignore-bpf
5-
// ignore-bpf
6-
// ignore-hexagon
7-
// ignore-mips
8-
// ignore-mips64
9-
// ignore-msp430
10-
// ignore-powerpc64
11-
// ignore-powerpc
12-
// ignore-sparc
13-
// ignore-sparc64
14-
// ignore-s390x
15-
// ignore-thumb
16-
// ignore-nvptx64
17-
// ignore-spirv
18-
// ignore-wasm32
19-
// ignore-wasm64
20-
// ignore-emscripten
21-
// ignore-loongarch64
1+
// revisions: x32 x64
2+
//[x32] only-x86
3+
//[x64] only-x86_64
224
// compile-flags: -C no-prepopulate-passes
235

246
#![crate_type = "lib"]

tests/codegen/global_asm_include.rs

+3-21
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,6 @@
1-
// ignore-aarch64
2-
// ignore-arm
3-
// ignore-avr
4-
// ignore-bpf
5-
// ignore-bpf
6-
// ignore-hexagon
7-
// ignore-mips
8-
// ignore-mips64
9-
// ignore-msp430
10-
// ignore-powerpc64
11-
// ignore-powerpc
12-
// ignore-sparc
13-
// ignore-sparc64
14-
// ignore-s390x
15-
// ignore-thumb
16-
// ignore-nvptx64
17-
// ignore-spirv
18-
// ignore-wasm32
19-
// ignore-wasm64
20-
// ignore-emscripten
21-
// ignore-loongarch64
1+
// revisions: x32 x64
2+
//[x32] only-x86
3+
//[x64] only-x86_64
224
// compile-flags: -C no-prepopulate-passes
235

246
#![crate_type = "lib"]

tests/codegen/global_asm_x2.rs

+3-21
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,6 @@
1-
// ignore-aarch64
2-
// ignore-arm
3-
// ignore-avr
4-
// ignore-bpf
5-
// ignore-bpf
6-
// ignore-hexagon
7-
// ignore-mips
8-
// ignore-mips64
9-
// ignore-msp430
10-
// ignore-powerpc64
11-
// ignore-powerpc
12-
// ignore-sparc
13-
// ignore-sparc64
14-
// ignore-s390x
15-
// ignore-thumb
16-
// ignore-nvptx64
17-
// ignore-spirv
18-
// ignore-wasm32
19-
// ignore-wasm64
20-
// ignore-emscripten
21-
// ignore-loongarch64
1+
// revisions: x32 x64
2+
//[x32] only-x86
3+
//[x64] only-x86_64
224
// compile-flags: -C no-prepopulate-passes
235

246
#![crate_type = "lib"]

tests/codegen/repr/transparent-imm-array.rs

+9-13
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
1+
// revisions: arm mips thumb wasm32
12
// compile-flags: -C no-prepopulate-passes
23
//
3-
4-
// ignore-aarch64
4+
//[arm] only-arm
5+
//[mips] only-mips
6+
//[thumb] only-thumb
7+
//[wasm32] only-wasm32
58
// ignore-emscripten
6-
// ignore-mips64
7-
// ignore-powerpc
8-
// ignore-powerpc64
9-
// ignore-riscv64 see codegen/riscv-abi
10-
// ignore-s390x
11-
// ignore-sparc
12-
// ignore-sparc64
13-
// ignore-x86
14-
// ignore-x86_64
15-
// ignore-loongarch64
16-
// See repr-transparent.rs
9+
// See ./transparent.rs
10+
// Some platforms pass large aggregates using immediate arrays in LLVMIR
11+
// Other platforms pass large aggregates using struct pointer in LLVMIR
12+
// This covers the "immediate array" case.
1713

1814
#![feature(transparent_unions)]
1915

tests/codegen/repr/transparent-mips64.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33

44
// only-mips64
5-
// See repr-transparent.rs
5+
// See ./transparent.rs
66

77
#![feature(transparent_unions)]
88

tests/codegen/repr/transparent-struct-ptr.rs

+10-12
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1+
// revisions: x32 x64 sparc sparc64
12
// compile-flags: -O -C no-prepopulate-passes
23
//
3-
4-
// ignore-arm
5-
// ignore-aarch64
6-
// ignore-mips
7-
// ignore-mips64
8-
// ignore-powerpc
9-
// ignore-powerpc64
10-
// ignore-riscv64 see codegen/riscv-abi
11-
// ignore-s390x
4+
//[x32] only-x86
5+
//[x64] only-x86_64
6+
//[sparc] only-sparc
7+
//[sparc64] only-sparc64
128
// ignore-windows
13-
// ignore-loongarch64
14-
// ignore-wasm32-bare
15-
// See repr-transparent.rs
9+
// See ./transparent.rs
10+
// Some platforms pass large aggregates using immediate arrays in LLVMIR
11+
// Other platforms pass large aggregates using struct pointer in LLVMIR
12+
// This covers the "struct pointer" case.
13+
1614

1715
#![feature(transparent_unions)]
1816

tests/codegen/repr/transparent.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
// compile-flags: -O -C no-prepopulate-passes
2-
32
// ignore-riscv64 riscv64 has an i128 type used with test_Vector
4-
// see codegen/riscv-abi for riscv functiona call tests
53
// ignore-s390x s390x with default march passes vector types per reference
64
// ignore-loongarch64 see codegen/loongarch-abi for loongarch function call tests
75

6+
// This codegen test embeds assumptions about how certain "C" psABIs are handled
7+
// so it doesn't apply to all architectures or even all OS
8+
// For RISCV: see codegen/riscv-abi
9+
// For LoongArch: see codegen/loongarch-abi
10+
811
#![crate_type="lib"]
912
#![feature(repr_simd, transparent_unions)]
1013

@@ -159,7 +162,7 @@ pub union UnionF32WithZsts {
159162
pub extern "C" fn test_UnionF32WithZsts(_: UnionF32WithZsts) -> UnionF32WithZsts { loop {} }
160163

161164

162-
// All that remains to be tested are aggregates. They are tested in separate files called repr-
165+
// All that remains to be tested are aggregates. They are tested in separate files called
163166
// transparent-*.rs with `only-*` or `ignore-*` directives, because the expected LLVM IR
164167
// function signatures vary so much that it's not reasonably possible to cover all of them with a
165168
// single CHECK line.

tests/debuginfo/thread-names.rs

+3-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
// compile-flags:-g
2+
// revisions: macos windows
23
// We can't set the main thread name on Linux because it renames the process (#97191)
3-
// ignore-linux
4-
// ignore-android
5-
// ignore-dragonfly
6-
// ignore-emscripten
7-
// ignore-freebsd
8-
// ignore-haiku
9-
// ignore-ios
10-
// ignore-netbsd
11-
// ignore-openbsd
12-
// ignore-solaris
4+
//[macos] only-macos
5+
//[windows] only-windows
136
// ignore-sgx
147
// ignore-windows-gnu
158

tests/ui/abi/stack-probes-lto.rs

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1+
// revisions: x32 x64
12
// run-pass
2-
// ignore-arm
3-
// ignore-aarch64
4-
// ignore-mips
5-
// ignore-mips64
6-
// ignore-sparc
7-
// ignore-sparc64
8-
// ignore-loongarch64
9-
// ignore-wasm
10-
// ignore-emscripten no processes
3+
//[x32] only-x86
4+
//[x64] only-x86_64
115
// ignore-sgx no processes
126
// ignore-musl FIXME #31506
137
// ignore-fuchsia no exception handler registered for segfault

tests/ui/abi/stack-probes.rs

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1+
// revisions: x32 x64
12
// run-pass
2-
// ignore-arm
3-
// ignore-aarch64
4-
// ignore-mips
5-
// ignore-mips64
6-
// ignore-sparc
7-
// ignore-sparc64
8-
// ignore-loongarch64
9-
// ignore-wasm
3+
//[x32] only-x86
4+
//[x64] only-x86_64
105
// ignore-emscripten no processes
116
// ignore-sgx no processes
127
// ignore-fuchsia no exception handler registered for segfault

tests/ui/target-feature/gate.rs

+2-13
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
1-
// ignore-arm
2-
// ignore-aarch64
3-
// ignore-wasm
4-
// ignore-emscripten
5-
// ignore-mips
6-
// ignore-mips64
7-
// ignore-powerpc
8-
// ignore-powerpc64
9-
// ignore-riscv64
10-
// ignore-sparc
11-
// ignore-sparc64
12-
// ignore-s390x
13-
// ignore-loongarch64
1+
// only-x86_64
2+
//
143
// gate-test-sse4a_target_feature
154
// gate-test-powerpc_target_feature
165
// gate-test-avx512_target_feature

tests/ui/target-feature/gate.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0658]: the target feature `avx512bw` is currently unstable
2-
--> $DIR/gate.rs:32:18
2+
--> $DIR/gate.rs:21:18
33
|
44
LL | #[target_feature(enable = "avx512bw")]
55
| ^^^^^^^^^^^^^^^^^^^

tests/ui/target-feature/invalid-attribute.rs

+1-13
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
1-
// ignore-arm
2-
// ignore-aarch64
3-
// ignore-wasm
4-
// ignore-emscripten
5-
// ignore-mips
6-
// ignore-mips64
7-
// ignore-powerpc
8-
// ignore-powerpc64
9-
// ignore-riscv64
10-
// ignore-s390x
11-
// ignore-sparc
12-
// ignore-sparc64
13-
// ignore-loongarch64
1+
// only-x86_64
142

153
#![warn(unused_attributes)]
164

0 commit comments

Comments
 (0)