@@ -20,7 +20,7 @@ use std::{
2020 fmt:: { self , Debug , Display , Formatter } ,
2121 fs,
2222 hash:: Hash ,
23- io:: { self , BufReader , BufWriter } ,
23+ io:: { self , BufReader , BufWriter , Read } ,
2424 path:: { Path , PathBuf } ,
2525 process:: ExitCode ,
2626 sync:: { mpsc:: channel, Arc } ,
@@ -426,11 +426,13 @@ fn run(cli: Cli) -> ExitCode {
426426 . into_par_iter ( )
427427 . for_each_with ( exec_reports_sender, |sender, path| {
428428 let res = fs:: File :: open ( & path)
429- . map ( BufReader :: new)
430429 . map_err ( Report :: msg)
431430 . wrap_err ( "failed to open file" )
432- . and_then ( |reader| {
433- serde_json:: from_reader :: < _ , ExecutionReport > ( reader)
431+ . and_then ( |mut f| {
432+ let mut s = String :: new ( ) ;
433+ f. read_to_string ( & mut s) . unwrap ( ) ;
434+ let first = s. lines ( ) . next ( ) . unwrap ( ) ;
435+ serde_json:: from_str :: < ExecutionReport > ( first)
434436 . into_diagnostic ( )
435437 . wrap_err ( "failed to parse JSON" )
436438 } )
@@ -712,7 +714,7 @@ fn run(cli: Cli) -> ExitCode {
712714 let mut files = BTreeMap :: < PathBuf , File > :: new ( ) ;
713715 for ( test_path, ( properties, subtests) ) in recombined_tests_iter {
714716 let name = test_path. test_name ( ) . to_string ( ) ;
715- let rel_path = Utf8PathBuf :: from ( test_path. rel_metadata_path_fx ( ) . to_string ( ) ) ;
717+ let rel_path = Utf8PathBuf :: from ( test_path. rel_metadata_path_fx ( servo ) . to_string ( ) ) ;
716718 let path = gecko_checkout. join ( & rel_path) ;
717719 let file = files. entry ( path) . or_insert_with ( || File {
718720 properties : file_props_by_file
0 commit comments