File tree 1 file changed +39
-11
lines changed
1 file changed +39
-11
lines changed Original file line number Diff line number Diff line change @@ -136,21 +136,49 @@ fn rebuild_sub_package_then_while_package() {
136
136
. file ( "b/src/lib.rs" , "" )
137
137
. build ( ) ;
138
138
139
- p. cargo ( "build" ) . run ( ) ;
139
+ p. cargo ( "build" )
140
+ . with_stderr (
141
+ "\
142
+ [COMPILING] b [..]
143
+ [COMPILING] a [..]
144
+ [COMPILING] foo [..]
145
+ [FINISHED] dev [..]
146
+ " ,
147
+ )
148
+ . run ( ) ;
140
149
141
- File :: create ( & p . root ( ) . join ( "b/src/lib.rs" ) )
142
- . unwrap ( )
143
- . write_all ( br#"pub fn b() {}"# )
144
- . unwrap ( ) ;
150
+ if is_coarse_mtime ( ) {
151
+ sleep_ms ( 1000 ) ;
152
+ }
153
+ p . change_file ( "b/src/lib.rs" , "pub fn b() {}" ) ;
145
154
146
- p. cargo ( "build -pb" ) . run ( ) ;
155
+ p. cargo ( "build -pb -v" )
156
+ . with_stderr (
157
+ "\
158
+ [COMPILING] b [..]
159
+ [RUNNING] `rustc --crate-name b [..]
160
+ [FINISHED] dev [..]
161
+ " ,
162
+ )
163
+ . run ( ) ;
147
164
148
- File :: create ( & p . root ( ) . join ( "src/lib.rs" ) )
149
- . unwrap ( )
150
- . write_all ( br# "extern crate a; extern crate b; pub fn toplevel() {}"# )
151
- . unwrap ( ) ;
165
+ p . change_file (
166
+ "src/lib.rs" ,
167
+ "extern crate a; extern crate b; pub fn toplevel() {}" ,
168
+ ) ;
152
169
153
- p. cargo ( "build" ) . run ( ) ;
170
+ p. cargo ( "build -v" )
171
+ . with_stderr (
172
+ "\
173
+ [FRESH] b [..]
174
+ [COMPILING] a [..]
175
+ [RUNNING] `rustc --crate-name a [..]
176
+ [COMPILING] foo [..]
177
+ [RUNNING] `rustc --crate-name foo [..]
178
+ [FINISHED] dev [..]
179
+ " ,
180
+ )
181
+ . run ( ) ;
154
182
}
155
183
156
184
#[ cargo_test]
You can’t perform that action at this time.
0 commit comments