35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
;;======================================================================
;; cmd is a symbol
;; vars is a json string encoding the parameters for the call
;;
(define (rmt:send-receive cmd params)
(case *transport-type*
((fs)
(debug:print 0 "ERROR: Not yet (re)supported")
(exit 1))
((http)
(let* ((jparams (rmt:dat->json-str params))
(res (http-transport:client-api-send-receive *runremote* cmd jparams)))
(if res
(rmt:json-str->dat res)
(begin
(debug:print 0 "ERROR: Bad value from http-transport:client-api-send-receive " res)
#f))
))
(else
(debug:print 0 "ERROR: Transport " *transport-type* " not yet (re)supported")
(exit 1))))
|
|
|
|
|
|
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
;;======================================================================
;; cmd is a symbol
;; vars is a json string encoding the parameters for the call
;;
(define (rmt:send-receive cmd params)
(case *transport-type*
((fs-aint-here)
(debug:print 0 "ERROR: Not yet (re)supported")
(exit 1))
((fs http)
(let* ((jparams (db:obj->string params)) ;; (rmt:dat->json-str params))
(res (http-transport:client-api-send-receive *runremote* cmd jparams)))
(if res
(db:string->obj res) ;; (rmt:json-str->dat res)
(begin
(debug:print 0 "ERROR: Bad value from http-transport:client-api-send-receive " res)
#f))
))
(else
(debug:print 0 "ERROR: Transport " *transport-type* " not yet (re)supported")
(exit 1))))
|
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
|
(rmt:send-receive 'test-set-state-status-by-id (list test-id newstate newstatus newcomment)))
(define (rmt:set-tests-state-status run-id testnames currstate currstatus newstate newstatus)
(rmt:send-receive 'set-tests-state-status (list run-id testnames currstate currstatus newstate newstatus)))
(define (rmt:get-tests-for-run run-id testpatt states statuses offset limit not-in sort-by sort-order qryvals)
(map list->vector (rmt:send-receive 'get-tests-for-run (list run-id testpatt states statuses offset limit not-in sort-by sort-order qryvals))))
(define (rmt:get-tests-for-runs-mindata run-ids testpatt states status not-in)
(map list->vector (rmt:send-receive 'get-tests-for-runs-mindata (list run-ids testpatt states status not-in))))
(define (rmt:delete-test-records test-id)
(rmt:send-receive 'delete-test-records (list test-id)))
(define (rmt:test-set-status-state test-id status state msg)
(rmt:send-receive 'test-set-status-state (list test-id status state msg)))
|
|
>
>
>
|
>
>
>
|
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
(rmt:send-receive 'test-set-state-status-by-id (list test-id newstate newstatus newcomment)))
(define (rmt:set-tests-state-status run-id testnames currstate currstatus newstate newstatus)
(rmt:send-receive 'set-tests-state-status (list run-id testnames currstate currstatus newstate newstatus)))
(define (rmt:get-tests-for-run run-id testpatt states statuses offset limit not-in sort-by sort-order qryvals)
(let ((res (rmt:send-receive 'get-tests-for-run (list run-id testpatt states statuses offset limit not-in sort-by sort-order qryvals))))
(if (list? res)
(map list->vector res)
res)))
(define (rmt:get-tests-for-runs-mindata run-ids testpatt states status not-in)
(let ((res (rmt:send-receive 'get-tests-for-runs-mindata (list run-ids testpatt states status not-in))))
(cond
((list? res)(map list->vector res))
(else res))))
(define (rmt:delete-test-records test-id)
(rmt:send-receive 'delete-test-records (list test-id)))
(define (rmt:test-set-status-state test-id status state msg)
(rmt:send-receive 'test-set-status-state (list test-id status state msg)))
|