@@ -8,7 +8,7 @@ use crate::common::util::{is_ci, run_ucmd_as_root, TestScenario};
8
8
use filetime:: FileTime ;
9
9
use std:: fs;
10
10
use std:: os:: unix:: fs:: { MetadataExt , PermissionsExt } ;
11
- #[ cfg( not( any ( windows, target_os = "freebsd" ) ) ) ]
11
+ #[ cfg( not( windows) ) ]
12
12
use std:: process:: Command ;
13
13
#[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
14
14
use std:: thread:: sleep;
@@ -610,13 +610,17 @@ fn test_install_copy_then_compare_file_with_extra_mode() {
610
610
}
611
611
612
612
const STRIP_TARGET_FILE : & str = "helloworld_installed" ;
613
- #[ cfg( not( any ( windows, target_os = "freebsd" ) ) ) ]
613
+ #[ cfg( all ( not( windows) , not ( target_os = "freebsd" ) ) ) ]
614
614
const SYMBOL_DUMP_PROGRAM : & str = "objdump" ;
615
- #[ cfg( not( any( windows, target_os = "freebsd" ) ) ) ]
615
+ #[ cfg( target_os = "freebsd" ) ]
616
+ const SYMBOL_DUMP_PROGRAM : & str = "llvm-objdump" ;
617
+ #[ cfg( not( windows) ) ]
616
618
const STRIP_SOURCE_FILE_SYMBOL : & str = "main" ;
617
619
618
620
fn strip_source_file ( ) -> & ' static str {
619
- if cfg ! ( target_os = "macos" ) {
621
+ if cfg ! ( target_os = "freebsd" ) {
622
+ "helloworld_freebsd"
623
+ } else if cfg ! ( target_os = "macos" ) {
620
624
"helloworld_macos"
621
625
} else if cfg ! ( target_arch = "arm" ) || cfg ! ( target_arch = "aarch64" ) {
622
626
"helloworld_android"
@@ -626,8 +630,7 @@ fn strip_source_file() -> &'static str {
626
630
}
627
631
628
632
#[ test]
629
- // FixME: Freebsd fails on 'No such file or directory'
630
- #[ cfg( not( any( windows, target_os = "freebsd" ) ) ) ]
633
+ #[ cfg( not( windows) ) ]
631
634
fn test_install_and_strip ( ) {
632
635
let scene = TestScenario :: new ( util_name ! ( ) ) ;
633
636
let at = & scene. fixtures ;
@@ -650,8 +653,7 @@ fn test_install_and_strip() {
650
653
}
651
654
652
655
#[ test]
653
- // FixME: Freebsd fails on 'No such file or directory'
654
- #[ cfg( not( any( windows, target_os = "freebsd" ) ) ) ]
656
+ #[ cfg( not( windows) ) ]
655
657
fn test_install_and_strip_with_program ( ) {
656
658
let scene = TestScenario :: new ( util_name ! ( ) ) ;
657
659
let at = & scene. fixtures ;
@@ -677,8 +679,6 @@ fn test_install_and_strip_with_program() {
677
679
678
680
#[ cfg( all( unix, feature = "chmod" ) ) ]
679
681
#[ test]
680
- // FixME: Freebsd fails on 'No such file or directory'
681
- #[ cfg( not( target_os = "freebsd" ) ) ]
682
682
fn test_install_and_strip_with_program_hyphen ( ) {
683
683
let scene = TestScenario :: new ( util_name ! ( ) ) ;
684
684
@@ -717,8 +717,6 @@ fn test_install_and_strip_with_program_hyphen() {
717
717
718
718
#[ cfg( all( unix, feature = "chmod" ) ) ]
719
719
#[ test]
720
- // FixME: Freebsd fails on 'No such file or directory'
721
- #[ cfg( not( target_os = "freebsd" ) ) ]
722
720
fn test_install_on_invalid_link_at_destination ( ) {
723
721
let scene = TestScenario :: new ( util_name ! ( ) ) ;
724
722
@@ -748,8 +746,6 @@ fn test_install_on_invalid_link_at_destination() {
748
746
749
747
#[ cfg( all( unix, feature = "chmod" ) ) ]
750
748
#[ test]
751
- // FixME: Freebsd fails on 'No such file or directory'
752
- #[ cfg( not( target_os = "freebsd" ) ) ]
753
749
fn test_install_on_invalid_link_at_destination_and_dev_null_at_source ( ) {
754
750
let scene = TestScenario :: new ( util_name ! ( ) ) ;
755
751
0 commit comments