311311"""
312312Compare a case's fresh run against its golden file and print the report.
313313
314- Returns `(n_pass, n_fail, n_untracked, n_informational)`. Only gating classes can fail;
315- `diagnostic` and `unconverged` quantities are shown with their deviation and marked as
316- informational, so a reader sees them move without the run failing on them.
314+ Returns `(n_pass, n_fail, n_untracked, n_informational, n_run_failed)`. Only gating classes
315+ can fail; `diagnostic` and `unconverged` quantities are shown with their deviation and marked
316+ as informational, so a reader sees them move without the run failing on them. A run that
317+ crashed outright is counted in `n_run_failed`, never in `n_fail`, so the caller can exit with
318+ a crash message instead of a tolerance message.
317319"""
318320function report_golden_check (db:: SQLite.DB , case_spec:: CaseSpec , commit_hash:: String )
319321 golden = load_golden (case_spec. name)
@@ -322,15 +324,15 @@ function report_golden_check(db::SQLite.DB, case_spec::CaseSpec, commit_hash::St
322324 if golden === nothing
323325 println (" No golden file at $(golden_path (case_spec. name)) — nothing to check against." )
324326 println (" Generate one with: regress --update-golden --cases $(case_spec. name) --reason \" ...\" " )
325- return (n_pass= 0 , n_fail= 0 , n_untracked= 0 , n_informational= 0 )
327+ return (n_pass= 0 , n_fail= 0 , n_untracked= 0 , n_informational= 0 , n_run_failed = 0 )
326328 end
327329
328330 quantities = get_quantities (db, commit_hash, case_spec. name)
329331 info = get_run_info (db, commit_hash, case_spec. name)
330332 if info != = nothing && ! info. success
331333 println (" RUN FAILED — nothing to compare (this is a crash, not a tolerance failure):" )
332334 println (" $(_short_err (info. error_msg)) " )
333- return (n_pass= 0 , n_fail= 1 , n_untracked= 0 , n_informational= 0 )
335+ return (n_pass= 0 , n_fail= 0 , n_untracked= 0 , n_informational= 0 , n_run_failed = 1 )
334336 end
335337
336338 rows = Vector {Vector{String}} ()
@@ -419,7 +421,7 @@ function report_golden_check(db::SQLite.DB, case_spec::CaseSpec, commit_hash::St
419421 n_untracked > 0 && push! (parts, " $n_untracked untracked" )
420422 println (" Summary: " , join (parts, " , " ))
421423 println ()
422- return (n_pass= n_pass, n_fail= n_fail, n_untracked= n_untracked, n_informational= n_informational)
424+ return (n_pass= n_pass, n_fail= n_fail, n_untracked= n_untracked, n_informational= n_informational, n_run_failed = 0 )
423425end
424426
425427"""
0 commit comments