@@ -60,17 +60,26 @@ pub fn run_tests(env: &Environment) -> anyhow::Result<()> {
60
60
. join ( format ! ( "llvm-config{}" , executable_extension( ) ) ) ;
61
61
assert ! ( llvm_config. is_file( ) ) ;
62
62
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
67
66
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}" ) ;
72
79
73
80
// Simulate a stage 0 compiler with the extracted optimized dist artifacts.
81
+ std:: fs:: write ( "config.toml" , config_content) ?;
82
+
74
83
let x_py = env. checkout_path ( ) . join ( "x.py" ) ;
75
84
let mut args = vec ! [
76
85
env. python_binary( ) ,
@@ -89,12 +98,6 @@ pub fn run_tests(env: &Environment) -> anyhow::Result<()> {
89
98
"tests/run-pass-valgrind" ,
90
99
"tests/ui" ,
91
100
"tests/crashes" ,
92
- "--set" ,
93
- & rustc,
94
- "--set" ,
95
- & cargo,
96
- "--set" ,
97
- & llvm_config,
98
101
] ;
99
102
for test_path in env. skipped_tests ( ) {
100
103
args. extend ( [ "--skip" , test_path] ) ;
0 commit comments