@@ -214,8 +214,6 @@ fn alias_and_path_for_library() {
214
214
assert_eq ! ( first( cache. all:: <doc:: Std >( ) ) , & [ doc_std!( A => A , stage = 0 ) ] ) ;
215
215
}
216
216
217
- // FIXME: This is failing in various runners in merge CI.
218
- #[ ignore]
219
217
#[ test]
220
218
fn ci_rustc_if_unchanged_logic ( ) {
221
219
let config = Config :: parse_inner (
@@ -227,10 +225,6 @@ fn ci_rustc_if_unchanged_logic() {
227
225
|& _| Ok ( Default :: default ( ) ) ,
228
226
) ;
229
227
230
- if config. rust_info . is_from_tarball ( ) {
231
- return ;
232
- }
233
-
234
228
let build = Build :: new ( config. clone ( ) ) ;
235
229
let builder = Builder :: new ( & build) ;
236
230
@@ -240,26 +234,33 @@ fn ci_rustc_if_unchanged_logic() {
240
234
241
235
builder. run_step_descriptions ( & Builder :: get_step_descriptions ( config. cmd . kind ( ) ) , & [ ] ) ;
242
236
243
- let compiler_path = build. src . join ( "compiler" ) ;
244
- let library_path = build. src . join ( "library" ) ;
245
-
246
- let commit =
247
- get_closest_merge_commit ( Some ( & builder. config . src ) , & builder. config . git_config ( ) , & [
248
- compiler_path. clone ( ) ,
249
- library_path. clone ( ) ,
250
- ] )
251
- . unwrap ( ) ;
252
-
253
- let has_changes = !helpers:: git ( Some ( & builder. src ) )
254
- . args ( [ "diff-index" , "--quiet" , & commit] )
255
- . arg ( "--" )
256
- . args ( [ compiler_path, library_path] )
257
- . as_command_mut ( )
258
- . status ( )
259
- . unwrap ( )
260
- . success ( ) ;
261
-
262
- assert ! ( has_changes == config. download_rustc_commit. is_none( ) ) ;
237
+ // Make sure "if-unchanged" logic doesn't try to use CI rustc while there are changes
238
+ // in compiler and/or library.
239
+ if config. download_rustc_commit . is_some ( ) {
240
+ let compiler_path = build. src . join ( "compiler" ) ;
241
+ let library_path = build. src . join ( "library" ) ;
242
+
243
+ let commit =
244
+ get_closest_merge_commit ( Some ( & builder. config . src ) , & builder. config . git_config ( ) , & [
245
+ compiler_path. clone ( ) ,
246
+ library_path. clone ( ) ,
247
+ ] )
248
+ . unwrap ( ) ;
249
+
250
+ let has_changes = !helpers:: git ( Some ( & builder. src ) )
251
+ . args ( [ "diff-index" , "--quiet" , & commit] )
252
+ . arg ( "--" )
253
+ . args ( [ compiler_path, library_path] )
254
+ . as_command_mut ( )
255
+ . status ( )
256
+ . unwrap ( )
257
+ . success ( ) ;
258
+
259
+ assert ! (
260
+ !has_changes,
261
+ "CI download can't be enabled from 'if-unchanged' while there are changes in compiler and/or library."
262
+ ) ;
263
+ }
263
264
}
264
265
265
266
mod defaults {
0 commit comments