File tree 1 file changed +20
-0
lines changed
src/bootstrap/src/core/builder
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,26 @@ fn test_intersection() {
121
121
] ) ;
122
122
}
123
123
124
+ #[ test]
125
+ fn test_resolve_parent_and_subpaths ( ) {
126
+ let set = |paths : & [ & str ] | {
127
+ PathSet :: Set ( paths. into_iter ( ) . map ( |p| TaskPath { path : p. into ( ) , kind : None } ) . collect ( ) )
128
+ } ;
129
+
130
+ let mut command_paths = vec ! [
131
+ CLIStepPath :: from( PathBuf :: from( "src/tools/miri" ) ) ,
132
+ CLIStepPath :: from( PathBuf :: from( "src/tools/miri/cargo-miri" ) ) ,
133
+ ] ;
134
+
135
+ let library_set = set ( & [ "src/tools/miri" , "src/tools/miri/cargo-miri" ] ) ;
136
+ library_set. intersection_removing_matches ( & mut command_paths, Kind :: Build ) ;
137
+
138
+ assert_eq ! ( command_paths, vec![
139
+ CLIStepPath :: from( PathBuf :: from( "src/tools/miri" ) ) . will_be_executed( true ) ,
140
+ CLIStepPath :: from( PathBuf :: from( "src/tools/miri/cargo-miri" ) ) . will_be_executed( true ) ,
141
+ ] ) ;
142
+ }
143
+
124
144
#[ test]
125
145
fn validate_path_remap ( ) {
126
146
let build = Build :: new ( configure ( "test" , & [ TEST_TRIPLE_1 ] , & [ TEST_TRIPLE_1 ] ) ) ;
You can’t perform that action at this time.
0 commit comments