@@ -95,17 +95,41 @@ mod os_impl {
9595 return true ;
9696 }
9797
98+ // FIXME: check when rust-installer test sh files will be removed,
99+ // and then remove them from exclude list
100+ const RI_EXCLUSION_LIST : & [ & str ] = & [
101+ "src/tools/rust-installer/test/image1/bin/program" ,
102+ "src/tools/rust-installer/test/image1/bin/program2" ,
103+ "src/tools/rust-installer/test/image1/bin/bad-bin" ,
104+ "src/tools/rust-installer/test/image2/bin/oldprogram" ,
105+ "src/tools/rust-installer/test/image3/bin/cargo" ,
106+ ] ;
107+
108+ fn filter_rust_installer_no_so_bins ( path : & Path ) -> bool {
109+ RI_EXCLUSION_LIST . iter ( ) . any ( |p| path. ends_with ( p) )
110+ }
111+
98112 #[ cfg( unix) ]
99113 pub fn check ( path : & Path , bad : & mut bool ) {
100114 use std:: ffi:: OsStr ;
101115
102116 const ALLOWED : & [ & str ] = & [ "configure" , "x" ] ;
103117
118+ for p in RI_EXCLUSION_LIST {
119+ if !path. join ( Path :: new ( p) ) . exists ( ) {
120+ tidy_error ! ( bad, "rust-installer test bins missed: {p}" ) ;
121+ }
122+ }
123+
104124 // FIXME: we don't need to look at all binaries, only files that have been modified in this branch
105125 // (e.g. using `git ls-files`).
106126 walk_no_read (
107127 & [ path] ,
108- |path, _is_dir| filter_dirs ( path) || path. ends_with ( "src/etc" ) ,
128+ |path, _is_dir| {
129+ filter_dirs ( path)
130+ || path. ends_with ( "src/etc" )
131+ || filter_rust_installer_no_so_bins ( path)
132+ } ,
109133 & mut |entry| {
110134 let file = entry. path ( ) ;
111135 let extension = file. extension ( ) ;
0 commit comments