|
22 | 22 | (delta (map (lambda (a b)(abs (- a b))) c1 c2)))
|
23 | 23 | (null? (filter (lambda (x)(> x 3)) delta))))
|
24 | 24 |
|
| 25 | +(define gutils:colors |
| 26 | + '((PASS . "70 249 73") |
| 27 | + (FAIL . "253 33 49") |
| 28 | + (SKIP . "230 230 0"))) |
| 29 | + |
| 30 | +(define (gutils:get-color-spec effective-state) |
| 31 | + (or (alist-ref effective-state gutils:colors) |
| 32 | + (alist-ref 'FAIL gutils:colors))) |
| 33 | + |
25 | 34 | (define (gutils:get-color-for-state-status state status);; #!key (get-label #f))
|
26 | 35 | ;; ((if get-label cadr car)
|
27 | 36 | (case (string->symbol state)
|
28 | 37 | ((COMPLETED) ;; ARCHIVED)
|
29 | 38 | (case (string->symbol status)
|
30 | 39 | ((PASS) (list "70 249 73" status))
|
31 | 40 | ((WARN WAIVED) (list "255 172 13" status))
|
32 |
| - ((SKIP) (list "230 230 0" status)) |
| 41 | + ((SKIP) (list (gutils:get-color-spec 'SKIP) status)) |
33 | 42 | ((ABORT) (list "198 36 166" status))
|
34 | 43 | (else (list "253 33 49" status))))
|
35 | 44 | ((ARCHIVED)
|
36 | 45 | (case (string->symbol status)
|
37 | 46 | ((PASS) (list "70 170 73" status))
|
38 | 47 | ((WARN WAIVED) (list "200 130 13" status))
|
39 |
| - ((SKIP) (list "180 180 0" status)) |
| 48 | + ((SKIP) (list (gutils:get-color-spec 'SKIP) status)) |
40 | 49 | (else (list "180 33 49" status))))
|
41 | 50 | ;; (if (equal? status "PASS")
|
42 | 51 | ;; '("70 249 73" "PASS")
|
|
50 | 59 | ((RUNNING) (list "9 131 232" state))
|
51 | 60 | ((KILLREQ) (list "39 82 206" state))
|
52 | 61 | ((KILLED) (list "234 101 17" state))
|
53 |
| - ((NOT_STARTED) (list "240 240 240" state)) |
| 62 | + ((NOT_STARTED) (case (string->symbol status) |
| 63 | + ((CHECK)(list (gutils:get-color-spec 'SKIP) state)) |
| 64 | + (else (list "240 240 240" state)))) |
54 | 65 | ;; for xor mode below
|
55 | 66 | ;;
|
56 | 67 | ((CLEAN)
|
|
0 commit comments