@@ -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 } ,
@@ -427,11 +427,13 @@ fn run(cli: Cli) -> ExitCode {
427427 . into_par_iter ( )
428428 . for_each_with ( exec_reports_sender, |sender, path| {
429429 let res = fs:: File :: open ( & path)
430- . map ( BufReader :: new)
431430 . map_err ( Report :: msg)
432431 . wrap_err ( "failed to open file" )
433- . and_then ( |reader| {
434- serde_json:: from_reader :: < _ , ExecutionReport > ( reader)
432+ . and_then ( |mut f| {
433+ let mut s = String :: new ( ) ;
434+ f. read_to_string ( & mut s) . unwrap ( ) ;
435+ let first = s. lines ( ) . next ( ) . unwrap ( ) ;
436+ serde_json:: from_str :: < ExecutionReport > ( first)
435437 . into_diagnostic ( )
436438 . wrap_err ( "failed to parse JSON" )
437439 } )
@@ -713,7 +715,7 @@ fn run(cli: Cli) -> ExitCode {
713715 let mut files = BTreeMap :: < PathBuf , File > :: new ( ) ;
714716 for ( test_path, ( properties, subtests) ) in recombined_tests_iter {
715717 let name = test_path. test_name ( ) . to_string ( ) ;
716- let rel_path = Utf8PathBuf :: from ( test_path. rel_metadata_path_fx ( ) . to_string ( ) ) ;
718+ let rel_path = Utf8PathBuf :: from ( test_path. rel_metadata_path_fx ( servo ) . to_string ( ) ) ;
717719 let path = gecko_checkout. join ( & rel_path) ;
718720 let file = files. entry ( path) . or_insert_with ( || File {
719721 properties : file_props_by_file
0 commit comments