@@ -60,17 +60,26 @@ pub fn run_tests(env: &Environment) -> anyhow::Result<()> {
6060 . join ( format ! ( "llvm-config{}" , executable_extension( ) ) ) ;
6161 assert ! ( llvm_config. is_file( ) ) ;
6262
63- let rustc = format ! ( "build.rustc={}" , rustc_path. to_string( ) . replace( '\\' , "/" ) ) ;
64- let cargo = format ! ( "build.cargo={}" , cargo_path. to_string( ) . replace( '\\' , "/" ) ) ;
65- let llvm_config =
66- format ! ( "target.{host_triple}.llvm-config={}" , llvm_config. to_string( ) . replace( '\\' , "/" ) ) ;
63+ let config_content = format ! (
64+ r#"profile = "user"
65+ change-id = 115898
6766
68- log:: info!( "Set the following configurations for running tests:" ) ;
69- log:: info!( "\t {rustc}" ) ;
70- log:: info!( "\t {cargo}" ) ;
71- log:: info!( "\t {llvm_config}" ) ;
67+ [build]
68+ rustc = "{rustc}"
69+ cargo = "{cargo}"
70+
71+ [target.{host_triple}]
72+ llvm-config = "{llvm_config}"
73+ "# ,
74+ rustc = rustc_path. to_string( ) . replace( '\\' , "/" ) ,
75+ cargo = cargo_path. to_string( ) . replace( '\\' , "/" ) ,
76+ llvm_config = llvm_config. to_string( ) . replace( '\\' , "/" )
77+ ) ;
78+ log:: info!( "Using following `config.toml` for running tests:\n {config_content}" ) ;
7279
7380 // Simulate a stage 0 compiler with the extracted optimized dist artifacts.
81+ std:: fs:: write ( "config.toml" , config_content) ?;
82+
7483 let x_py = env. checkout_path ( ) . join ( "x.py" ) ;
7584 let mut args = vec ! [
7685 env. python_binary( ) ,
@@ -89,12 +98,6 @@ pub fn run_tests(env: &Environment) -> anyhow::Result<()> {
8998 "tests/run-pass-valgrind" ,
9099 "tests/ui" ,
91100 "tests/crashes" ,
92- "--set" ,
93- & rustc,
94- "--set" ,
95- & cargo,
96- "--set" ,
97- & llvm_config,
98101 ] ;
99102 for test_path in env. skipped_tests ( ) {
100103 args. extend ( [ "--skip" , test_path] ) ;
0 commit comments