File tree Expand file tree Collapse file tree 8 files changed +19
-24
lines changed 
src/tools/compiletest/src Expand file tree Collapse file tree 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] = &[
4242    "ignore-cdb" , 
4343    "ignore-compare-mode-next-solver" , 
4444    "ignore-compare-mode-polonius" , 
45+     "ignore-coverage-map" , 
46+     "ignore-coverage-run" , 
4547    "ignore-cross-compile" , 
4648    "ignore-debug" , 
4749    "ignore-eabi" , 
@@ -64,8 +66,6 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
6466    "ignore-loongarch64" , 
6567    "ignore-macabi" , 
6668    "ignore-macos" , 
67-     "ignore-mode-coverage-map" , 
68-     "ignore-mode-coverage-run" , 
6969    "ignore-msp430" , 
7070    "ignore-msvc" , 
7171    "ignore-musl" , 
Original file line number Diff line number Diff line change @@ -217,13 +217,10 @@ pub(super) fn parse_cfg_name_directive<'a>(
217217    } 
218218    // Coverage tests run the same test file in multiple modes. 
219219    // 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". 
221221    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" ] , 
227224        message:  "when the test mode is {name}" , 
228225    } 
229226
Original file line number Diff line number Diff line change @@ -572,17 +572,15 @@ fn families() {
572572} 
573573
574574#[ 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" ) ) ; 
586584} 
587585
588586#[ test]  
Original file line number Diff line number Diff line change 11   LL|       |//@ edition: 2021
2-    LL|       |//@ ignore-mode- coverage-map
2+    LL|       |//@ ignore-coverage-map
33   LL|       |//@ ignore-windows
44   LL|       |//@ llvm-cov-flags: --use-color
55   LL|       |
Original file line number Diff line number Diff line change 11//@ edition: 2021 
2- //@ ignore-mode- coverage-map 
2+ //@ ignore-coverage-map 
33//@ ignore-windows 
44//@ llvm-cov-flags: --use-color 
55
Original file line number Diff line number Diff line change 1-    LL|       |//@ ignore-mode- coverage-map
1+    LL|       |//@ ignore-coverage-map
22   LL|       |
33   LL|      1|fn main() {}
44
Original file line number Diff line number Diff line change 1- //@ ignore-mode- coverage-map 
1+ //@ ignore-coverage-map 
22
33fn  main ( )  { } 
Original file line number Diff line number Diff line change 1- //@ ignore-mode- coverage-run 
1+ //@ ignore-coverage-run 
22
33fn  main ( )  { } 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments