@@ -4618,75 +4618,6 @@ fn links_interrupted_can_restart() {
4618
4618
. run ( ) ;
4619
4619
}
4620
4620
4621
- #[ cargo_test]
4622
- #[ cfg( unix) ]
4623
- fn build_script_scan_eacces ( ) {
4624
- // build.rs causes a scan of the whole project, which can be a problem if
4625
- // a directory is not accessible.
4626
- use cargo_test_support:: git;
4627
- use std:: os:: unix:: fs:: PermissionsExt ;
4628
-
4629
- let p = project ( )
4630
- . file ( "src/lib.rs" , "" )
4631
- . file ( "build.rs" , "fn main() {}" )
4632
- . file ( "secrets/stuff" , "" )
4633
- . build ( ) ;
4634
- let path = p. root ( ) . join ( "secrets" ) ;
4635
- fs:: set_permissions ( & path, fs:: Permissions :: from_mode ( 0o0 ) ) . unwrap ( ) ;
4636
- // The last "Caused by" is a string from libc such as the following:
4637
- // Permission denied (os error 13)
4638
- p. cargo ( "build" )
4639
- . with_stderr (
4640
- "\
4641
- [ERROR] failed to determine package fingerprint for build script for foo v0.0.1 ([..]/foo)
4642
- An I/O error happened[..]
4643
-
4644
- By default[..]
4645
- it to[..]
4646
- file[..]
4647
- See[..]
4648
-
4649
- Caused by:
4650
- failed to determine the most recently modified file in [..]/foo
4651
-
4652
- Caused by:
4653
- failed to determine list of files in [..]/foo
4654
-
4655
- Caused by:
4656
- IO error for operation on [..]/foo/secrets: [..]
4657
-
4658
- Caused by:
4659
- [..]
4660
- " ,
4661
- )
4662
- . with_status ( 101 )
4663
- . run ( ) ;
4664
-
4665
- // Try `package.exclude` to skip a directory.
4666
- p. change_file (
4667
- "Cargo.toml" ,
4668
- r#"
4669
- [package]
4670
- name = "foo"
4671
- version = "0.0.1"
4672
- exclude = ["secrets"]
4673
- "# ,
4674
- ) ;
4675
- p. cargo ( "build" ) . run ( ) ;
4676
-
4677
- // Try with git. This succeeds because the git status walker ignores
4678
- // directories it can't access.
4679
- p. change_file ( "Cargo.toml" , & basic_manifest ( "foo" , "0.0.1" ) ) ;
4680
- p. build_dir ( ) . rm_rf ( ) ;
4681
- let repo = git:: init ( & p. root ( ) ) ;
4682
- git:: add ( & repo) ;
4683
- git:: commit ( & repo) ;
4684
- p. cargo ( "build" ) . run ( ) ;
4685
-
4686
- // Restore permissions so that the directory can be deleted.
4687
- fs:: set_permissions ( & path, fs:: Permissions :: from_mode ( 0o755 ) ) . unwrap ( ) ;
4688
- }
4689
-
4690
4621
#[ cargo_test]
4691
4622
fn dev_dep_with_links ( ) {
4692
4623
let p = project ( )
0 commit comments