79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
(startp (testdat-start-printed tdat))
(endp (testdat-end-printed tdat))
(etime (testdat-event-time tdat))
(overall (case state
((RUNNING) state)
((COMPLETED) state)
(else 'UNK)))
(tstmp (conc " timestamp='" etime "'")))
(case overall
((RUNNING)
(if (not startp)
(begin
(print "##teamcity[testStarted " tcname flowid tstmp "]")
(testdat-start-printed-set! tdat #t))))
((COMPLETED)
|
|
|
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
(startp (testdat-start-printed tdat))
(endp (testdat-end-printed tdat))
(etime (testdat-event-time tdat))
(overall (case state
((RUNNING) state)
((COMPLETED) state)
(else 'UNK)))
(tstmp (conc " timestamp='" (time->string (seconds->local-time etime) "%F %T") "'")))
(case overall
((RUNNING)
(if (not startp)
(begin
(print "##teamcity[testStarted " tcname flowid tstmp "]")
(testdat-start-printed-set! tdat #t))))
((COMPLETED)
|
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
(testdat-end-printed-set! tdat #t))))
(else
(if flush-mode
(begin
(if (not startp)
(begin
(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)))))))
;; (print "ERROR: tc-type \"" (testdat-tc-type tdat) "\" not recognised for " tcname)))
(flush-output)))
|
|
|
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
(testdat-end-printed-set! tdat #t))))
(else
(if flush-mode
(begin
(if (not startp)
(begin
(print "##teamcity[testStarted " tcname flowid tstmp "]")
(testdat-start-printed-set! tdat #t)))
(if (not endp)
(begin
(print "##teamcity[testFailed " tcname flowid comment details "]")
(testdat-end-printed-set! tdat #t)))))))
;; (print "ERROR: tc-type \"" (testdat-tc-type tdat) "\" not recognised for " tcname)))
(flush-output)))
|
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
(let* ((print-time (- (current-seconds) age)) ;; print stuff over 15 seconds old
(tqueue-raw (hash-table-ref/default data 'tqueue '()))
(tqueue (reverse (delete-duplicates tqueue-raw ;; REMOVE duplicates by testname and state
(lambda (a b)
(and (equal? (testdat-tname a)(testdat-tname b)) ;; need oldest to newest
(equal? (testdat-state a) (testdat-state b)))))))) ;; "COMPLETED")
;; (equal? (testdat-state b) "COMPLETED")))))))
(if (null? tqueue)
(print "Nothing to do!")
(hash-table-set!
data
'tqueue
(let loop ((hed (car tqueue)) ;; by this point all duplicates by state COMPLETED are removed
(tal (cdr tqueue))
(rem '()))
(if (> print-time (testdat-event-time hed)) ;; event happened over 15 seconds ago
|
|
<
|
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
(let* ((print-time (- (current-seconds) age)) ;; print stuff over 15 seconds old
(tqueue-raw (hash-table-ref/default data 'tqueue '()))
(tqueue (reverse (delete-duplicates tqueue-raw ;; REMOVE duplicates by testname and state
(lambda (a b)
(and (equal? (testdat-tname a)(testdat-tname b)) ;; need oldest to newest
(equal? (testdat-state a) (testdat-state b)))))))) ;; "COMPLETED")
;; (equal? (testdat-state b) "COMPLETED")))))))
(if (not (null? tqueue))
(hash-table-set!
data
'tqueue
(let loop ((hed (car tqueue)) ;; by this point all duplicates by state COMPLETED are removed
(tal (cdr tqueue))
(rem '()))
(if (> print-time (testdat-event-time hed)) ;; event happened over 15 seconds ago
|