Megatest

Diff
Login

Differences From Artifact [34618ac6f7]:

To Artifact [e93ad79735]:


95
96
97
98
99
100
101
















































102
103
104
105
106
107
108
		     ((args:get-arg "-v")    2)
		     ((args:get-arg "-q")    0)
		     (else                   1)))

(define uidat #f)
;; (megatest-dashboard)

















































(define (message-window msg)
  (iup:show
   (iup:dialog
    (iup:vbox 
     (iup:label msg #:margin "40x40")))))

(define (iuplistbox-fill-list lb items . default)







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
		     ((args:get-arg "-v")    2)
		     ((args:get-arg "-q")    0)
		     (else                   1)))

(define uidat #f)
;; (megatest-dashboard)

;(define img1 (iup:image/palette 16 16 (u8vector->blob (u8vector
;				   1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 
;				   1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 
;				   1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 
;				   1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 
;				   1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 
;				   1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 
;				   1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 
;				   1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 
;				   2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 
;				   2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 
;				   2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 
;				   2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 
;				   2 2 2 0 2 0 2 0 2 2 0 2 2 2 0 0 
;				   2 2 2 0 2 0 0 2 0 0 2 0 2 0 2 2 
;				   2 2 2 0 2 0 2 2 0 2 2 0 2 2 2 2 
;				   2 2 2 0 2 0 2 2 0 2 2 0 2 2 0 0 
;				   2 2 2 0 2 0 2 2 0 2 2 0 2 0 2 1))))
;
;(define img2 (iup:image/palette 16 16 (u8vector->blob (u8vector
;				   2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 
;				   2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 
;				   2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 
;				   1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 
;				   1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 
;				   1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 
;				   1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 
;				   1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 
;				   2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 
;				   2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 
;				   2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 
;				   2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 
;				   2 2 2 0 2 0 2 0 2 2 0 2 2 2 0 0 
;				   2 2 2 0 2 0 0 2 0 0 2 0 2 0 2 2 
;				   2 2 2 0 2 0 2 2 0 2 2 0 2 2 2 2 
;				   2 2 2 0 2 0 2 2 0 2 2 0 2 2 0 0 
;				   2 2 2 0 2 0 2 2 0 2 2 0 2 0 2 1))))
;
;(iup:handle-name-set! img1 "img1")
;(iup:attribute-set! img1 "0" "0 0 0")
;(iup:attribute-set! img1 "1" "BGCOLOR")
;(iup:attribute-set! img1 "2" "255 0 0")
;
;(iup:handle-name-set! img2 "img2")
;(iup:attribute-set! img2 "0" "0 0 0")
;(iup:attribute-set! img2 "1" "BGCOLOR")
;(iup:attribute-set! img2 "2" "255 0 0")

(define (message-window msg)
  (iup:show
   (iup:dialog
    (iup:vbox 
     (iup:label msg #:margin "40x40")))))

(define (iuplistbox-fill-list lb items . default)
150
151
152
153
154
155
156


157


158
159
160
161
162
163
164
165
(define (toggle-hide lnum) ; fulltestname)
  (let* ((btn (vector-ref (vector-ref uidat 0) lnum))
	 (fulltestname (iup:attribute btn "TITLE"))
	 (parts        (string-split fulltestname "("))
	 (basetestname (if (null? parts) "" (car parts))))
    ;(print "Toggling " basetestname " currently " (hash-table-ref/default *collapsed* basetestname #f))
    (if (hash-table-ref/default *collapsed* basetestname #f)


	(hash-table-delete! *collapsed* basetestname)


	(hash-table-set! *collapsed* basetestname #t))))
  
(define blank-line-rx (regexp "^\\s*$"))

(define (collapse-rows inlst)
  (let ((newlst (filter (lambda (x)
			  (let* ((tparts    (string-split x "("))
				 (basetname (if (null? tparts) x (car tparts))))







>
>
|
>
>
|







198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
(define (toggle-hide lnum) ; fulltestname)
  (let* ((btn (vector-ref (vector-ref uidat 0) lnum))
	 (fulltestname (iup:attribute btn "TITLE"))
	 (parts        (string-split fulltestname "("))
	 (basetestname (if (null? parts) "" (car parts))))
    ;(print "Toggling " basetestname " currently " (hash-table-ref/default *collapsed* basetestname #f))
    (if (hash-table-ref/default *collapsed* basetestname #f)
	(begin
	  ;(iup:attribute-set! btn "FGCOLOR" "0 0 0")
	  (hash-table-delete! *collapsed* basetestname))
	(begin
	  ;(iup:attribute-set! btn "FGCOLOR" "0 192 192")
	  (hash-table-set! *collapsed* basetestname #t)))))
  
(define blank-line-rx (regexp "^\\s*$"))

(define (collapse-rows inlst)
  (let ((newlst (filter (lambda (x)
			  (let* ((tparts    (string-split x "("))
				 (basetname (if (null? tparts) x (car tparts))))
202
203
204
205
206
207
208

209
210
211
212
213
214
215
	;	  '()))
    (let loop ((i 0))
      (let* ((lbl    (vector-ref lftcol i))
	     (oldval (iup:attribute lbl "TITLE"))
	     (newval (vector-ref allvals i)))
	(if (not (equal? oldval newval))
	    (iup:attribute-set! lbl "TITLE" newval))

	(if (< i maxn)
	    (loop (+ i 1)))))))

(define (get-color-for-state-status state status)
  (case (string->symbol state)
    ((COMPLETED)
     (if (equal? status "PASS")







>







254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
	;	  '()))
    (let loop ((i 0))
      (let* ((lbl    (vector-ref lftcol i))
	     (oldval (iup:attribute lbl "TITLE"))
	     (newval (vector-ref allvals i)))
	(if (not (equal? oldval newval))
	    (iup:attribute-set! lbl "TITLE" newval))
	(iup:attribute-set! lbl "FGCOLOR" (if (hash-table-ref/default *collapsed* newval #f) "0 112 112" "0 0 0"))
	(if (< i maxn)
	    (loop (+ i 1)))))))

(define (get-color-for-state-status state status)
  (case (string->symbol state)
    ((COMPLETED)
     (if (equal? status "PASS")
370
371
372
373
374
375
376


377
378
379
380
381
382
383
      (cond
       ((>= testnum ntests)
	;; now lftlst will be an hbox with the test keys and the test name labels
	(set! lftlst (append lftlst (list (apply iup:vbox (reverse res))))))
       (else
	(let ((labl  (iup:button "" 
				 #:flat "YES" 


				 #:size "100x15"
				 #:fontsize "10"
				 #:action (lambda (obj)
					      (toggle-hide testnum))))) ;; (iup:attribute obj "TITLE"))))
	  (vector-set! lftcol testnum labl)
	  (loop (+ testnum 1)(cons labl res))))))
    ;; 







>
>







423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
      (cond
       ((>= testnum ntests)
	;; now lftlst will be an hbox with the test keys and the test name labels
	(set! lftlst (append lftlst (list (apply iup:vbox (reverse res))))))
       (else
	(let ((labl  (iup:button "" 
				 #:flat "YES" 
				 ; #:image img1
				 ; #:impress img2
				 #:size "100x15"
				 #:fontsize "10"
				 #:action (lambda (obj)
					      (toggle-hide testnum))))) ;; (iup:attribute obj "TITLE"))))
	  (vector-set! lftcol testnum labl)
	  (loop (+ testnum 1)(cons labl res))))))
    ;;