File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
collector/src/compile/execute Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ use crate::compile::benchmark::profile::Profile;
5
5
use crate :: compile:: benchmark:: scenario:: Scenario ;
6
6
use crate :: compile:: benchmark:: BenchmarkName ;
7
7
use crate :: toolchain:: Toolchain ;
8
+ use crate :: utils:: fs:: EnsureImmutableFile ;
8
9
use crate :: { async_command_output, command_output, utils} ;
9
10
use anyhow:: Context ;
10
11
use bencher:: Bencher ;
@@ -203,6 +204,12 @@ impl<'a> CargoProcess<'a> {
203
204
) ;
204
205
205
206
loop {
207
+ // Make sure that Cargo.lock isn't changed by the build
208
+ let _guard = EnsureImmutableFile :: new (
209
+ & self . cwd . join ( "Cargo.lock" ) ,
210
+ self . processor_name . 0 . clone ( ) ,
211
+ ) ?;
212
+
206
213
// Get the subcommand. If it's not `rustc` it must should be a
207
214
// subcommand that itself invokes `rustc` (so that the `FAKE_RUSTC`
208
215
// machinery works).
@@ -316,6 +323,7 @@ impl<'a> CargoProcess<'a> {
316
323
317
324
let cmd = tokio:: process:: Command :: from ( cmd) ;
318
325
let output = async_command_output ( cmd) . await ?;
326
+
319
327
if let Some ( ( ref mut processor, scenario, scenario_str, patch) ) = self . processor_etc {
320
328
let data = ProcessOutputData {
321
329
name : self . processor_name . clone ( ) ,
You can’t perform that action at this time.
0 commit comments