Overview
Comment: | switched to compact table of queries |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | switch-to-zmq |
Files: | files | file ages | folders |
SHA1: |
c8473ef1f834aeeffd4ed366cc4c3d0f |
User & Date: | matt on 2012-10-24 11:57:02 |
Other Links: | branch diff | manifest | tags |
Context
2012-10-24
| ||
12:54 | Merged switch-to-zmq branch to trunk check-in: 5824df90dd user: matt tags: trunk | |
11:57 | switched to compact table of queries Closed-Leaf check-in: c8473ef1f8 user: matt tags: switch-to-zmq | |
07:02 | Fix to kill check-in: 85a1288370 user: matt tags: switch-to-zmq | |
Changes
Modified db.scm from [f9d64d5f5d] to [4acdad91df].
︙ | |||
1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 | 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 | + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - - - - - - - + - - + - - - - - - + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + - - - - - | (list item-path) (list item-path "")))) (cdb:client-call zmqsocket 'register-test #t run-id test-name item-path))) (define (cdb:flush-queue zmqsocket) (cdb:client-call zmqsocket 'flush #f)) (define db:queries '((register-test "INSERT OR IGNORE INTO tests (run_id,testname,event_time,item_path,state,status) VALUES (?,?,strftime('%s','now'),?,'NOT_STARTED','n/a');") (state-status "UPDATE tests SET state=?,status=? WHERE id=?;") (state-status-msg "UPDATE tests SET state=?,status=?,comment=? WHERE id=?;") (pass-fail-counts "UPDATE tests SET fail_count=?,pass_count=? WHERE id=?;") (test_data-pf-rollup "UPDATE tests SET status=CASE WHEN (SELECT fail_count FROM tests WHERE id=?) > 0 THEN 'FAIL' WHEN (SELECT pass_count FROM tests WHERE id=?) > 0 AND (SELECT status FROM tests WHERE id=?) NOT IN ('WARN','FAIL') THEN 'PASS' ELSE status END WHERE id=?;") (rollup-tests-pass-fail "UPDATE tests SET fail_count=(SELECT count(id) FROM tests WHERE run_id=? AND testname=? AND item_path != '' AND status='FAIL'), pass_count=(SELECT count(id) FROM tests WHERE run_id=? AND testname=? AND item_path != '' AND (status='PASS' OR status='WARN' OR status='WAIVED')) WHERE run_id=? AND testname=? AND item_path='';"))) (define db:special-queries '(rollup-tests-pass-fail)) (define db:run-local-queries '(rollup-tests-pass-fail)) ;; The queue is a list of vectors where the zeroth slot indicates the type of query to ;; apply and the second slot is the time of the query and the third entry is a list of ;; values to be applied ;; (define (db:write-cached-data) (open-run-close |
︙ |
Modified launch.scm from [cbfe4ed966] to [589d6c81e2].
︙ | |||
294 295 296 297 298 299 300 301 302 303 304 305 306 307 | 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | + | (set! job-thread th2) (thread-start! th1) (thread-start! th2) (thread-join! th2) (mutex-lock! m) (let* ((item-path (item-list->path itemdat)) (testinfo (open-run-close db:get-test-info-by-id #f test-id))) ;; )) ;; run-id test-name item-path))) ;; Am I completed? (if (not (equal? (db:test-get-state testinfo) "COMPLETED")) (begin (debug:print 2 "Test NOT logged as COMPLETED, (state=" (db:test-get-state testinfo) "), updating result, rollup-status is " rollup-status) (tests:test-set-status! test-id (if kill-job? "KILLED" "COMPLETED") (cond ((not (vector-ref exit-info 1)) "FAIL") ;; job failed to run |
︙ |
Modified server.scm from [3324d285ea] to [bac33f4748].
︙ | |||
24 25 26 27 28 29 30 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | - + | (include "db_records.scm") (define (server:run hostn) (debug:print 0 "Attempting to start the server ...") (let ((host:port (open-run-close db:get-var #f "SERVER"))) ;; do whe already have a server running? (if host:port (begin |
︙ |
Modified tests.scm from [bb24b274de] to [3a659785c9].
︙ | |||
219 220 221 222 223 224 225 | 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | - + | (debug:print 4 "real-status " real-status ", waived " waived ", status " status) ;; update the primary record IF state AND status are defined (if (and state status) (cdb:test-set-status-state *runremote* test-id real-status state #f)) ;; if status is "AUTO" then call rollup (note, this one modifies data in test |
︙ |