Index: common.scm ================================================================== --- common.scm +++ common.scm @@ -156,5 +156,15 @@ ((RUNNING) "9 131 232") ((KILLREQ) "39 82 206") ((KILLED) "234 101 17") ((NOT_STARTED) "240 240 240") (else "192 192 192"))) + +(define (common:get-color-from-status status) + (cond + ((equal? status "PASS") "green") + ((equal? status "FAIL") "red") + ((equal? status "WARN") "orange") + ((equal? status "KILLED") "orange") + ((equal? status "KILLREQ") "purple") + ((equal? status "RUNNING") "blue") + (else "black"))) Index: runs.scm ================================================================== --- runs.scm +++ runs.scm @@ -172,39 +172,40 @@ (hash-table-set! counts status (+ 1 (hash-table-ref/default counts status 0))) (hash-table-set! statecounts state (+ 1 (hash-table-ref/default statecounts state 0))) (set! outtxt (conc outtxt "" " " itempath "" "" state "" - "" status "" - "" (if (equal? comment "") - " " - comment) "" - ""))) + "" status "" + "" (if (equal? comment "") + " " + comment) "" + ""))) db "SELECT id,item_path,state,status,run_duration,final_logf,comment FROM tests WHERE run_id=? AND testname=? AND item_path != '';" run-id test-name) + (print "
") ;; Print out stats for status (set! tot 0) - (print "

State stats

") + (print "
") (for-each (lambda (state) (set! tot (+ tot (hash-table-ref statecounts state))) (print "")) (hash-table-keys statecounts)) (print "

State stats

" state "" (hash-table-ref statecounts state) "
Total" tot "
") - + (print "
") ;; Print out stats for state (set! tot 0) - (print "

Status stats

") + (print "
") (for-each (lambda (status) (set! tot (+ tot (hash-table-ref counts status))) - (print "")) + (print "")) (hash-table-keys counts)) (print "

Status stats

" status "" (hash-table-ref counts status) "
" status + "" (hash-table-ref counts status) "
Total" tot "
") + (print "
") (print "" "" outtxt "
ItemStateStatusComment
") (release-dot-lock outputfilename)))