@@ -95,17 +95,41 @@ mod os_impl {
95
95
return true ;
96
96
}
97
97
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
+
98
112
#[ cfg( unix) ]
99
113
pub fn check ( path : & Path , bad : & mut bool ) {
100
114
use std:: ffi:: OsStr ;
101
115
102
116
const ALLOWED : & [ & str ] = & [ "configure" , "x" ] ;
103
117
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
+
104
124
// FIXME: we don't need to look at all binaries, only files that have been modified in this branch
105
125
// (e.g. using `git ls-files`).
106
126
walk_no_read (
107
127
& [ 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
+ } ,
109
133
& mut |entry| {
110
134
let file = entry. path ( ) ;
111
135
let extension = file. extension ( ) ;
0 commit comments