File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1531,6 +1531,20 @@ async fn run_benchmark_job(
15311531 ) ) ) ;
15321532 }
15331533
1534+ // Command launched before a benchmark suite. Useful to run an external root helper
1535+ // that brings the system in a consistent state.
1536+ if let Ok ( pre_run) = std:: env:: var ( "RUSTC_PERF_PRE_RUN_COMMAND" ) {
1537+ // split by ascii unit separator
1538+ let commandline = pre_run. split ( '\x1f' ) . collect :: < Vec < _ > > ( ) ;
1539+ let mut cmd = tokio:: process:: Command :: new ( commandline[ 0 ] ) ;
1540+ cmd. args ( & commandline[ 1 ..] ) ;
1541+ cmd. status ( ) . await . map_err ( |error| {
1542+ BenchmarkJobError :: Permanent ( anyhow:: anyhow!(
1543+ "Failed to execute RUSTC_PERF_PRE_RUN_COMMAND `{pre_run}`: {error:?}"
1544+ ) )
1545+ } ) ?;
1546+ }
1547+
15341548 log:: info!( "Downloading sysroot" ) ;
15351549 let toolchain = match & artifact_id {
15361550 ArtifactId :: Commit ( commit) => {
You can’t perform that action at this time.
0 commit comments