@@ -24,13 +24,13 @@ fn touch_all(path: &Path) -> anyhow::Result<()> {
24
24
let mut cmd = Command :: new ( "bash" ) ;
25
25
cmd. current_dir ( path)
26
26
. args ( & [ "-c" , "find . -name '*.rs' | xargs touch" ] ) ;
27
- command_output ( & mut cmd) ?;
27
+ command_output ( & mut cmd) . with_context ( || format ! ( "touching all .rs in {:?}" , path ) ) ?;
28
28
// We also delete the cmake caches to avoid errors when moving directories around.
29
29
// This might be a bit slower but at least things build
30
30
let mut cmd = Command :: new ( "bash" ) ;
31
31
cmd. current_dir ( path)
32
32
. args ( & [ "-c" , "find . -name 'CMakeCache.txt' -delete" ] ) ;
33
- command_output ( & mut cmd) ?;
33
+ command_output ( & mut cmd) . with_context ( || format ! ( "deleting cmake caches in {:?}" , path ) ) ?;
34
34
Ok ( ( ) )
35
35
}
36
36
@@ -308,7 +308,17 @@ impl<'a> CargoProcess<'a> {
308
308
309
309
log:: debug!( "{:?}" , cmd) ;
310
310
311
- touch_all ( & self . cwd ) ?;
311
+ // Touch all the files under the Cargo.toml of the manifest we're
312
+ // benchmarking, so as to not refresh dependencies, which may be
313
+ // in-tree (e.g., in the case of the servo crates there are a lot of
314
+ // other components).
315
+ touch_all (
316
+ & self . cwd . join (
317
+ Path :: new ( & self . manifest_path )
318
+ . parent ( )
319
+ . expect ( "manifest has parent" ) ,
320
+ ) ,
321
+ ) ?;
312
322
313
323
let output = command_output ( & mut cmd) ?;
314
324
if let Some ( ( ref mut processor, run_kind, run_kind_str, patch) ) = self . processor_etc {
@@ -886,7 +896,7 @@ impl Benchmark {
886
896
base_dot. push ( "." ) ;
887
897
let tmp_dir = TempDir :: new ( ) ?;
888
898
let mut cmd = Command :: new ( "cp" ) ;
889
- cmd. arg ( "-LR " ) . arg ( base_dot) . arg ( tmp_dir. path ( ) ) ;
899
+ cmd. arg ( "-pLR " ) . arg ( base_dot) . arg ( tmp_dir. path ( ) ) ;
890
900
command_output ( & mut cmd) . with_context ( || format ! ( "copying {} to tmp dir" , self . name) ) ?;
891
901
Ok ( tmp_dir)
892
902
}
0 commit comments