@@ -94,6 +94,10 @@ enum EnvironmentCmd {
9494 /// Arguments passed to `rustc-perf --cargo-config <value>` when running benchmarks.
9595 #[ arg( long) ]
9696 benchmark_cargo_config : Vec < String > ,
97+
98+ /// Perform tests after final build if it's not a try build
99+ #[ arg( long) ]
100+ run_tests : bool ,
97101 } ,
98102 /// Perform an optimized build on Linux CI, from inside Docker.
99103 LinuxCi {
@@ -125,6 +129,7 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
125129 skipped_tests,
126130 benchmark_cargo_config,
127131 shared,
132+ run_tests,
128133 } => {
129134 let env = EnvironmentBuilder :: default ( )
130135 . host_tuple ( target_triple)
@@ -138,6 +143,7 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
138143 . use_bolt ( use_bolt)
139144 . skipped_tests ( skipped_tests)
140145 . benchmark_cargo_config ( benchmark_cargo_config)
146+ . run_tests ( run_tests)
141147 . build ( ) ?;
142148
143149 ( env, shared. build_args )
@@ -160,6 +166,7 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
160166 // FIXME: Enable bolt for aarch64 once it's fixed upstream. Broken as of December 2024.
161167 . use_bolt ( !is_aarch64)
162168 . skipped_tests ( vec ! [ ] )
169+ . run_tests ( true )
163170 . build ( ) ?;
164171
165172 ( env, shared. build_args )
@@ -179,6 +186,7 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
179186 . shared_llvm ( false )
180187 . use_bolt ( false )
181188 . skipped_tests ( vec ! [ ] )
189+ . run_tests ( true )
182190 . build ( ) ?;
183191
184192 ( env, shared. build_args )
@@ -344,7 +352,7 @@ fn execute_pipeline(
344352 // possible regressions.
345353 // The tests are not executed for try builds, which can be in various broken states, so we don't
346354 // want to gatekeep them with tests.
347- if !is_try_build ( ) {
355+ if !is_try_build ( ) && env . run_tests ( ) {
348356 timer. section ( "Run tests" , |_| run_tests ( env) ) ?;
349357 }
350358
0 commit comments