@@ -218,18 +218,16 @@ fn prepare_rustc_checkout(ctx: &mut GitCtx) {
218218
219219/// Parses a Config directory from `path`, with the given value of `download_rustc`.
220220fn parse_config_download_rustc_at ( path : & Path , download_rustc : & str , ci : bool ) -> Config {
221- Config :: parse_inner (
222- Flags :: parse ( & [
223- "build" . to_owned ( ) ,
224- "--dry-run" . to_owned ( ) ,
225- "--ci" . to_owned ( ) ,
226- if ci { "true" } else { "false" } . to_owned ( ) ,
227- format ! ( "--set=rust.download-rustc='{download_rustc}'" ) ,
228- "--src" . to_owned ( ) ,
229- path. to_str ( ) . unwrap ( ) . to_owned ( ) ,
230- ] ) ,
231- |& _| Ok ( Default :: default ( ) ) ,
232- )
221+ TestCtx :: new ( )
222+ . config ( "build" )
223+ . args ( & [
224+ "--ci" ,
225+ if ci { "true" } else { "false" } ,
226+ format ! ( "--set=rust.download-rustc='{download_rustc}'" ) . as_str ( ) ,
227+ "--src" ,
228+ path. to_str ( ) . unwrap ( ) ,
229+ ] )
230+ . create_config_without_ci_llvm_override ( )
233231}
234232
235233mod dist {
@@ -359,14 +357,7 @@ fn test_test_coverage() {
359357#[ test]
360358fn test_prebuilt_llvm_config_path_resolution ( ) {
361359 fn configure ( config : & str ) -> Config {
362- Config :: parse_inner (
363- Flags :: parse ( & [
364- "build" . to_string ( ) ,
365- "--dry-run" . to_string ( ) ,
366- "--config=/does/not/exist" . to_string ( ) ,
367- ] ) ,
368- |& _| toml:: from_str ( & config) ,
369- )
360+ TestCtx :: new ( ) . config ( "build" ) . config_toml ( config) . create_config ( )
370361 }
371362
372363 // Removes Windows disk prefix if present
0 commit comments