@@ -94,6 +94,10 @@ enum EnvironmentCmd {
94
94
/// Arguments passed to `rustc-perf --cargo-config <value>` when running benchmarks.
95
95
#[ arg( long) ]
96
96
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 ,
97
101
} ,
98
102
/// Perform an optimized build on Linux CI, from inside Docker.
99
103
LinuxCi {
@@ -125,6 +129,7 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
125
129
skipped_tests,
126
130
benchmark_cargo_config,
127
131
shared,
132
+ run_tests,
128
133
} => {
129
134
let env = EnvironmentBuilder :: default ( )
130
135
. host_tuple ( target_triple)
@@ -138,6 +143,7 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
138
143
. use_bolt ( use_bolt)
139
144
. skipped_tests ( skipped_tests)
140
145
. benchmark_cargo_config ( benchmark_cargo_config)
146
+ . run_tests ( run_tests)
141
147
. build ( ) ?;
142
148
143
149
( env, shared. build_args )
@@ -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
+ . run_tests ( true )
163
170
. build ( ) ?;
164
171
165
172
( env, shared. build_args )
@@ -179,6 +186,7 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
179
186
. shared_llvm ( false )
180
187
. use_bolt ( false )
181
188
. skipped_tests ( vec ! [ ] )
189
+ . run_tests ( true )
182
190
. build ( ) ?;
183
191
184
192
( env, shared. build_args )
@@ -344,7 +352,7 @@ fn execute_pipeline(
344
352
// possible regressions.
345
353
// The tests are not executed for try builds, which can be in various broken states, so we don't
346
354
// want to gatekeep them with tests.
347
- if !is_try_build ( ) {
355
+ if !is_try_build ( ) && env . run_tests ( ) {
348
356
timer. section ( "Run tests" , |_| run_tests ( env) ) ?;
349
357
}
350
358
0 commit comments