File tree 8 files changed +19
-24
lines changed
src/tools/compiletest/src
8 files changed +19
-24
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
42
42
"ignore-cdb" ,
43
43
"ignore-compare-mode-next-solver" ,
44
44
"ignore-compare-mode-polonius" ,
45
+ "ignore-coverage-map" ,
46
+ "ignore-coverage-run" ,
45
47
"ignore-cross-compile" ,
46
48
"ignore-debug" ,
47
49
"ignore-eabi" ,
@@ -64,8 +66,6 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
64
66
"ignore-loongarch64" ,
65
67
"ignore-macabi" ,
66
68
"ignore-macos" ,
67
- "ignore-mode-coverage-map" ,
68
- "ignore-mode-coverage-run" ,
69
69
"ignore-msp430" ,
70
70
"ignore-msvc" ,
71
71
"ignore-musl" ,
Original file line number Diff line number Diff line change @@ -217,13 +217,10 @@ pub(super) fn parse_cfg_name_directive<'a>(
217
217
}
218
218
// Coverage tests run the same test file in multiple modes.
219
219
// If a particular test should not be run in one of the modes, ignore it
220
- // with "ignore-mode- coverage-map" or "ignore-mode -coverage-run".
220
+ // with "ignore-coverage-map" or "ignore-coverage-run".
221
221
condition ! {
222
- name: format!( "mode-{}" , config. mode. to_str( ) ) ,
223
- allowed_names: ContainsPrefixed {
224
- prefix: "mode-" ,
225
- inner: [ "coverage-run" , "coverage-map" ] ,
226
- } ,
222
+ name: config. mode. to_str( ) ,
223
+ allowed_names: [ "coverage-map" , "coverage-run" ] ,
227
224
message: "when the test mode is {name}" ,
228
225
}
229
226
Original file line number Diff line number Diff line change @@ -572,17 +572,15 @@ fn families() {
572
572
}
573
573
574
574
#[ test]
575
- fn ignore_mode ( ) {
576
- for mode in [ "coverage-map" , "coverage-run" ] {
577
- // Indicate profiler support so that "coverage-run" tests aren't skipped.
578
- let config: Config = cfg ( ) . mode ( mode) . profiler_support ( true ) . build ( ) ;
579
- let other = if mode == "coverage-run" { "coverage-map" } else { "coverage-run" } ;
580
-
581
- assert_ne ! ( mode, other) ;
582
-
583
- assert ! ( check_ignore( & config, & format!( "//@ ignore-mode-{mode}" ) ) ) ;
584
- assert ! ( !check_ignore( & config, & format!( "//@ ignore-mode-{other}" ) ) ) ;
585
- }
575
+ fn ignore_coverage ( ) {
576
+ // Indicate profiler support so that "coverage-run" tests aren't skipped.
577
+ let config = cfg ( ) . mode ( "coverage-map" ) . profiler_support ( true ) . build ( ) ;
578
+ assert ! ( check_ignore( & config, "//@ ignore-coverage-map" ) ) ;
579
+ assert ! ( !check_ignore( & config, "//@ ignore-coverage-run" ) ) ;
580
+
581
+ let config = cfg ( ) . mode ( "coverage-run" ) . profiler_support ( true ) . build ( ) ;
582
+ assert ! ( !check_ignore( & config, "//@ ignore-coverage-map" ) ) ;
583
+ assert ! ( check_ignore( & config, "//@ ignore-coverage-run" ) ) ;
586
584
}
587
585
588
586
#[ test]
Original file line number Diff line number Diff line change 1
1
LL| |//@ edition: 2021
2
- LL| |//@ ignore-mode- coverage-map
2
+ LL| |//@ ignore-coverage-map
3
3
LL| |//@ ignore-windows
4
4
LL| |//@ llvm-cov-flags: --use-color
5
5
LL| |
Original file line number Diff line number Diff line change 1
1
//@ edition: 2021
2
- //@ ignore-mode- coverage-map
2
+ //@ ignore-coverage-map
3
3
//@ ignore-windows
4
4
//@ llvm-cov-flags: --use-color
5
5
Original file line number Diff line number Diff line change 1
- LL| |//@ ignore-mode- coverage-map
1
+ LL| |//@ ignore-coverage-map
2
2
LL| |
3
3
LL| 1|fn main() {}
4
4
Original file line number Diff line number Diff line change 1
- //@ ignore-mode- coverage-map
1
+ //@ ignore-coverage-map
2
2
3
3
fn main ( ) { }
Original file line number Diff line number Diff line change 1
- //@ ignore-mode- coverage-run
1
+ //@ ignore-coverage-run
2
2
3
3
fn main ( ) { }
You can’t perform that action at this time.
0 commit comments