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
@@ -158,6 +159,11 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
158
159
159
160
let is_aarch64 = target_triple. starts_with ( "aarch64" ) ;
160
161
162
+ // Parse the optional build components that impact the test environment.
163
+ let rust_configure_args = std:: env:: var ( "RUST_CONFIGURE_ARGS" )
164
+ . expect ( "RUST_CONFIGURE_ARGS environment variable missing" ) ;
165
+ let test_config = TestConfig :: from_configure_args ( & rust_configure_args) ;
166
+
161
167
let checkout_dir = Utf8PathBuf :: from ( "/checkout" ) ;
162
168
let env = EnvironmentBuilder :: default ( )
163
169
. host_tuple ( target_triple)
@@ -172,6 +178,7 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
172
178
. skipped_tests ( vec ! [ ] )
173
179
. run_tests ( true )
174
180
. fast_try_build ( is_fast_try_build)
181
+ . test_config ( test_config)
175
182
. build ( ) ?;
176
183
177
184
( env, shared. build_args )
@@ -180,6 +187,11 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
180
187
let target_triple =
181
188
std:: env:: var ( "PGO_HOST" ) . expect ( "PGO_HOST environment variable missing" ) ;
182
189
190
+ // Parse the optional build components that impact the test environment.
191
+ let rust_configure_args = std:: env:: var ( "RUST_CONFIGURE_ARGS" )
192
+ . expect ( "RUST_CONFIGURE_ARGS environment variable missing" ) ;
193
+ let test_config = TestConfig :: from_configure_args ( & rust_configure_args) ;
194
+
183
195
let checkout_dir: Utf8PathBuf = std:: env:: current_dir ( ) ?. try_into ( ) ?;
184
196
let env = EnvironmentBuilder :: default ( )
185
197
. host_tuple ( target_triple)
@@ -193,6 +205,7 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
193
205
. skipped_tests ( vec ! [ ] )
194
206
. run_tests ( true )
195
207
. fast_try_build ( is_fast_try_build)
208
+ . test_config ( test_config)
196
209
. build ( ) ?;
197
210
198
211
( env, shared. build_args )
0 commit comments