[sledge] Fix minor bug in test report generation

Summary:
Broken html could be generated if there were multiple status entries
for a single test.

Reviewed By: ngorogiannis

Differential Revision: D28907807

fbshipit-source-id: 5fcb30b5f
master
Josh Berdine 3 years ago committed by Facebook GitHub Bot
parent 099af312bb
commit abe8ba847a

@ -453,12 +453,14 @@ let write_html ranges rows chan =
( match ss with
| [] -> Printf.fprintf ppf ">"
| ss ->
List.iter ss ~f:(fun s ->
if
List.exists ss ~f:(fun s ->
match (s : Report.status) with
| Safe _ | Unsafe _ | Ok ->
Printf.fprintf ppf ">%a" pf_status s
| _ -> Printf.fprintf ppf "class=\"regress\">%a" pf_status s )
) ;
| Safe _ | Unsafe _ | Ok -> false
| _ -> true )
then Printf.fprintf ppf " class=\"regress\"" ;
Printf.fprintf ppf ">%s"
(Format.asprintf "%a" (List.pp " " Report.pp_status) ss) ) ;
Printf.fprintf ppf "</td>\n"
in
let statd ppf = function

Loading…
Cancel
Save