Index: tcmt.scm ================================================================== --- tcmt.scm +++ tcmt.scm @@ -76,24 +76,26 @@ (tcname (conc " name='" (testdat-tctname tdat) "'")) (state (string->symbol (testdat-state tdat))) (status (string->symbol (testdat-status tdat))) (startp (testdat-start-printed tdat)) (endp (testdat-end-printed tdat)) + (etime (testdat-event-time tdat)) (overall (case state ((RUNNING) state) ((COMPLETED) state) - (else 'UNK)))) + (else 'UNK))) + (tstmp (conc " timestamp='" etime "'"))) (case overall ((RUNNING) (if (not startp) (begin - (print "##teamcity[testStarted " tcname flowid "]") + (print "##teamcity[testStarted " tcname flowid tstmp "]") (testdat-start-printed-set! tdat #t)))) ((COMPLETED) (if (not startp) ;; start stanza never printed (begin - (print "##teamcity[testStarted " tcname flowid "]") + (print "##teamcity[testStarted " tcname flowid tstmp "]") (testdat-start-printed-set! tdat #t))) (if (not endp) (begin (if (member status '(PASS WARN SKIP WAIVED)) (print "##teamcity[testFinished" tcname flowid comment details duration "]") @@ -102,11 +104,11 @@ (else (if flush-mode (begin (if (not startp) (begin - (print "##teamcity[testStarted " tcname flowid "]") + (print "##teamcity[testStarted " tcname flowid tstmp "]") (testdat-started-printed-set! tdat #t))) (if (not endp) (begin (print "##teamcity[testFailed " tcname flowid comment details "]") (testdat-end-printed-set! tdat #t))))))) @@ -152,11 +154,11 @@ (tal (cdr tqueue)) (rem '())) (if (> print-time (testdat-event-time hed)) ;; event happened over 15 seconds ago (begin (tcmt:print hed flush-mode) - (if (null? tqueue) + (if (null? tal) rem ;; return rem to be processed in the future (loop (car tal)(cdr tal) rem))) (if (null? tal) (cons hed rem) ;; return rem + hed for future processing (loop (car tal)(cdr tal)(cons hed rem))))))))) @@ -198,10 +200,11 @@ (testname (db:test-get-testname test-rec)) (itempath (db:test-get-item-path test-rec)) (tctname (if (string=? itempath "") testname (conc testname "." (string-translate itempath "/" ".")))) (state (db:test-get-state test-rec)) (status (db:test-get-status test-rec)) + (etime (db:test-get-event_time test-rec)) (duration (or (any->number (db:test-get-run_duration test-rec)) 0)) (comment (db:test-get-comment test-rec)) (logfile (db:test-get-final_logf test-rec)) (newstat (cond ((equal? state "RUNNING") "RUNNING") @@ -228,11 +231,11 @@ (testdat-state-set! new state) (testdat-status-set! new status) (testdat-comment-set! new cmtstr) (testdat-details-set! new details) (testdat-duration-set! new duration) - (testdat-event-time-set! new (current-seconds)) + (testdat-event-time-set! new etime) ;; (current-seconds)) (testdat-overall-set! new newstat) (hash-table-set! data tname new) new)))) (if (not is-top) (hash-table-set! data 'tqueue (cons tdat tqueue)))