9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
;; PURPOSE.
;;======================================================================
(use format)
(require-library iup)
(import (prefix iup iup:))
(use canvas-draw)
(declare (unit dcommon))
(declare (uses megatest-version))
(declare (uses gutils))
(declare (uses db))
(declare (uses synchash))
|
>
|
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
;; PURPOSE.
;;======================================================================
(use format)
(require-library iup)
(import (prefix iup iup:))
(use canvas-draw)
(use regex)
(declare (unit dcommon))
(declare (uses megatest-version))
(declare (uses gutils))
(declare (uses db))
(declare (uses synchash))
|
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
(define (dboard:data-get-curr-test-ids vec) (vector-ref vec 5))
;; (define (dboard:data-get-test-details vec) (vector-ref vec 6))
(define (dboard:data-get-path-test-ids vec) (vector-ref vec 7))
(define (dboard:data-get-updaters vec) (vector-ref vec 8))
(define (dboard:data-get-path-run-ids vec) (vector-ref vec 9))
(define (dboard:data-get-curr-run-id vec) (vector-ref vec 10))
(define (dboard:data-get-runs-tree vec) (vector-ref vec 11))
(define (dboard:data-set-runs! vec val)(vector-set! vec 0 val))
(define (dboard:data-set-tests! vec val)(vector-set! vec 1 val))
(define (dboard:data-set-runs-matrix! vec val)(vector-set! vec 2 val))
(define (dboard:data-set-tests-tree! vec val)(vector-set! vec 3 val))
(define (dboard:data-set-run-keys! vec val)(vector-set! vec 4 val))
(define (dboard:data-set-curr-test-ids! vec val)(vector-set! vec 5 val))
;; (define (dboard:data-set-test-details! vec val)(vector-set! vec 6 val))
(define (dboard:data-set-path-test-ids! vec val)(vector-set! vec 7 val))
(define (dboard:data-set-updaters! vec val)(vector-set! vec 8 val))
(define (dboard:data-set-path-run-ids! vec val)(vector-set! vec 9 val))
(define (dboard:data-set-curr-run-id! vec val)(vector-set! vec 10 val))
(define (dboard:data-set-runs-tree! vec val)(vector-set! vec 12 val))
(dboard:data-set-run-keys! *data* (make-hash-table))
;; List of test ids being viewed in various panels
(dboard:data-set-curr-test-ids! *data* (make-hash-table))
;; Look up test-ids by (key1 key2 ... testname [itempath])
(dboard:data-set-path-test-ids! *data* (make-hash-table))
;; Look up run-ids by ??
(dboard:data-set-path-run-ids! *data* (make-hash-table))
;;======================================================================
;; P R O C E S S R U N S
;;======================================================================
;; MOVE THIS INTO *data*
(define *cachedata* (make-hash-table))
|
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
(define (dboard:data-get-curr-test-ids vec) (vector-ref vec 5))
;; (define (dboard:data-get-test-details vec) (vector-ref vec 6))
(define (dboard:data-get-path-test-ids vec) (vector-ref vec 7))
(define (dboard:data-get-updaters vec) (vector-ref vec 8))
(define (dboard:data-get-path-run-ids vec) (vector-ref vec 9))
(define (dboard:data-get-curr-run-id vec) (vector-ref vec 10))
(define (dboard:data-get-runs-tree vec) (vector-ref vec 11))
;; For test-patts convert #f to ""
(define (dboard:data-get-test-patts vec)
(let ((val (vector-ref vec 12)))(if val val "")))
(define (dboard:data-get-states vec) (vector-ref vec 12))
(define (dboard:data-get-statuses vec) (vector-ref vec 13))
(define (dboard:data-set-runs! vec val)(vector-set! vec 0 val))
(define (dboard:data-set-tests! vec val)(vector-set! vec 1 val))
(define (dboard:data-set-runs-matrix! vec val)(vector-set! vec 2 val))
(define (dboard:data-set-tests-tree! vec val)(vector-set! vec 3 val))
(define (dboard:data-set-run-keys! vec val)(vector-set! vec 4 val))
(define (dboard:data-set-curr-test-ids! vec val)(vector-set! vec 5 val))
;; (define (dboard:data-set-test-details! vec val)(vector-set! vec 6 val))
(define (dboard:data-set-path-test-ids! vec val)(vector-set! vec 7 val))
(define (dboard:data-set-updaters! vec val)(vector-set! vec 8 val))
(define (dboard:data-set-path-run-ids! vec val)(vector-set! vec 9 val))
(define (dboard:data-set-curr-run-id! vec val)(vector-set! vec 10 val))
(define (dboard:data-set-runs-tree! vec val)(vector-set! vec 11 val))
;; For test-patts convert "" to #f
(define (dboard:data-set-test-patts! vec val)
(vector-set! vec 12 (if (equal? val "") #f val)))
(define (dboard:data-set-states! vec val)(vector-set! vec 12 val))
(define (dboard:data-set-statuses! vec val)(vector-set! vec 13 val))
(define (dboard:data-set-logs-textbox! vec val)(vector-set! vec 14 val))
(dboard:data-set-run-keys! *data* (make-hash-table))
;; List of test ids being viewed in various panels
(dboard:data-set-curr-test-ids! *data* (make-hash-table))
;; Look up test-ids by (key1 key2 ... testname [itempath])
(dboard:data-set-path-test-ids! *data* (make-hash-table))
;; Look up run-ids by ??
(dboard:data-set-path-run-ids! *data* (make-hash-table))
;;======================================================================
;; TARGET AND PATTERN MANIPULATIONS
;;======================================================================
;; Convert to and from list of lines (for a text box)
;; "," => "\n"
(define (dboard:test-patt->lines test-patt)
(string-substitute (regexp ",") "\n" test-patt))
(define (dboard:lines->test-patt lines)
(string-substitute (regexp "\n") "," lines))
;;======================================================================
;; P R O C E S S R U N S
;;======================================================================
;; MOVE THIS INTO *data*
(define *cachedata* (make-hash-table))
|