1
1
use anyhow:: Context ;
2
2
use camino:: { Utf8Path , Utf8PathBuf } ;
3
3
use clap:: Parser ;
4
+ use environment:: TestConfig ;
4
5
use log:: LevelFilter ;
5
6
use utils:: io;
6
7
@@ -148,6 +149,11 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
148
149
149
150
let is_aarch64 = target_triple. starts_with ( "aarch64" ) ;
150
151
152
+ // Parse the optional build components that impact the test environment.
153
+ let rust_configure_args = std:: env:: var ( "RUST_CONFIGURE_ARGS" )
154
+ . expect ( "RUST_CONFIGURE_ARGS environment variable missing" ) ;
155
+ let test_config = TestConfig :: from_configure_args ( & rust_configure_args) ;
156
+
151
157
let checkout_dir = Utf8PathBuf :: from ( "/checkout" ) ;
152
158
let env = EnvironmentBuilder :: default ( )
153
159
. host_tuple ( target_triple)
@@ -160,6 +166,7 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
160
166
// FIXME: Enable bolt for aarch64 once it's fixed upstream. Broken as of December 2024.
161
167
. use_bolt ( !is_aarch64)
162
168
. skipped_tests ( vec ! [ ] )
169
+ . test_config ( test_config)
163
170
. build ( ) ?;
164
171
165
172
( env, shared. build_args )
@@ -168,6 +175,11 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
168
175
let target_triple =
169
176
std:: env:: var ( "PGO_HOST" ) . expect ( "PGO_HOST environment variable missing" ) ;
170
177
178
+ // Parse the optional build components that impact the test environment.
179
+ let rust_configure_args = std:: env:: var ( "RUST_CONFIGURE_ARGS" )
180
+ . expect ( "RUST_CONFIGURE_ARGS environment variable missing" ) ;
181
+ let test_config = TestConfig :: from_configure_args ( & rust_configure_args) ;
182
+
171
183
let checkout_dir: Utf8PathBuf = std:: env:: current_dir ( ) ?. try_into ( ) ?;
172
184
let env = EnvironmentBuilder :: default ( )
173
185
. host_tuple ( target_triple)
@@ -179,6 +191,7 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
179
191
. shared_llvm ( false )
180
192
. use_bolt ( false )
181
193
. skipped_tests ( vec ! [ ] )
194
+ . test_config ( test_config)
182
195
. build ( ) ?;
183
196
184
197
( env, shared. build_args )
0 commit comments