@@ -766,6 +766,29 @@ fn ignore_coverage() {
766766 assert ! ( check_ignore( & config, "//@ ignore-coverage-run" ) ) ;
767767}
768768
769+ #[ test]
770+ fn only_ignore_elf ( ) {
771+ let cases = & [
772+ ( "aarch64-apple-darwin" , false ) ,
773+ ( "aarch64-unknown-linux-gnu" , true ) ,
774+ ( "powerpc64-ibm-aix" , false ) ,
775+ ( "wasm32-unknown-unknown" , false ) ,
776+ ( "wasm32-wasip1" , false ) ,
777+ ( "x86_64-apple-darwin" , false ) ,
778+ ( "x86_64-pc-windows-msvc" , false ) ,
779+ ( "x86_64-unknown-freebsd" , true ) ,
780+ ( "x86_64-unknown-illumos" , true ) ,
781+ ( "x86_64-unknown-linux-gnu" , true ) ,
782+ ( "x86_64-unknown-none" , true ) ,
783+ ( "x86_64-unknown-uefi" , false ) ,
784+ ] ;
785+ for & ( target, is_elf) in cases {
786+ let config = & cfg ( ) . target ( target) . build ( ) ;
787+ assert_eq ! ( is_elf, check_ignore( config, "//@ ignore-elf" ) , "`//@ ignore-elf` for {target}" ) ;
788+ assert_eq ! ( is_elf, !check_ignore( config, "//@ only-elf" ) , "`//@ only-elf` for {target}" ) ;
789+ }
790+ }
791+
769792#[ test]
770793fn threads_support ( ) {
771794 let threads = [
0 commit comments