Skip to content

Commit

Permalink
egg-test-report: only print test info if test-status is truthy
Browse files Browse the repository at this point in the history
  • Loading branch information
mario-goulart committed Nov 13, 2014
1 parent a16a368 commit 7331460
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions salmonella-html-report.scm
Original file line number Diff line number Diff line change
Expand Up @@ -399,15 +399,18 @@

;;; Egg test report page
(define (egg-test-report egg log #!key menu)
`((h1 "Test output for " ,(link-egg-doc egg log) " ["
,(if (zero? (test-status egg log))
"ok"
"fail")
"]")
,(or menu '())
(p "Testing time: "
,(prettify-time (inexact->exact (test-duration egg log))))
(pre ,(test-message egg log))))
(let ((status (test-status egg log)))
`((h1 "Test output for " ,(link-egg-doc egg log) " ["
,(if (and status (zero? status))
"ok"
"fail")
"]")
,(or menu '())
,(if status
`((p "Testing time: "
,(prettify-time (inexact->exact (test-duration egg log))))
(pre ,(test-message egg log)))
'()))))

(define (egg-test-report-page egg log)
(page-template
Expand Down

0 comments on commit 7331460

Please sign in to comment.