121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
state=?,status=?,owner=?,event_time=?,comment=?,fail_count=?,pass_count=?
WHERE id=?;"
state status owner event-time comment fail-count pass-count run-id))
;; given all needed info create run record
;;
(define (pgdb:insert-run dbh ttype-id target run-name state status owner event-time comment fail-count pass-count)
(dbi:exec
dbh
"INSERT INTO runs (ttype_id,target,run_name,state,status,owner,event_time,comment,fail_count,pass_count)
VALUES (?,?,?,?,?,?,?,?,?,?);"
ttype-id target run-name state status owner event-time comment fail-count pass-count))
;;======================================================================
;; T E S T S
;;======================================================================
;; given run-id, test_name and item_path return test-id
;;
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
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
157
158
159
160
161
162
163
164
165
|
state=?,status=?,owner=?,event_time=?,comment=?,fail_count=?,pass_count=?
WHERE id=?;"
state status owner event-time comment fail-count pass-count run-id))
;; given all needed info create run record
;;
(define (pgdb:insert-run dbh ttype-id target run-name state status owner event-time comment fail-count pass-count)
(dbi:exec
dbh
"INSERT INTO runs (ttype_id,target,run_name,state,status,owner,event_time,comment,fail_count,pass_count)
VALUES (?,?,?,?,?,?,?,?,?,?);"
ttype-id target run-name state status owner event-time comment fail-count pass-count))
;;======================================================================
;; T E S T - S T E P S
;;======================================================================
(define (pgdb:get-test-step-id dbh test-id stepname)
(dbi:get-one
dbh
"SELECT id FROM test_steps WHERE test_id=? AND stepname=? ;"
test-id stepname))
(define (pgdb:insert-test-step dbh test-id stepname state status event_time comment logfile)
(dbi:exec
dbh
"INSERT INTO test_steps (test_id,stepname,state,status,event_time,logfile,comment)
VALUES (?,?,?,?,?,?,?);"
test-id stepname state status event_time logfile comment))
(define (pgdb:update-test-step dbh step-id test-id stepname state status event_time comment logfile)
(dbi:exec
dbh
"UPDATE test_steps SET
test_id=?,stepname=?,state=?,status=?,event_time=?,logfile=?,comment=?
WHERE id=?;"
test-id stepname state status event_time logfile comment step-id))
;;======================================================================
;; T E S T S
;;======================================================================
;; given run-id, test_name and item_path return test-id
;;
|