Overview
Comment: | Little bit further |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | refactor-dbr:dbstruct |
Files: | files | file ages | folders |
SHA1: |
8bf767b71b6ae0823eb72a59e63e5d31 |
User & Date: | matt on 2016-01-28 23:22:22 |
Other Links: | branch diff | manifest | tags |
Context
2016-09-08
| ||
23:34 | Merged v1.61 into refactor-dbr:dbstruct branch. Can use meld to bring some of the work back to v1.62 Closed-Leaf check-in: ac0e82322e user: matt tags: refactor-dbr:dbstruct | |
2016-01-28
| ||
23:22 | Little bit further check-in: 8bf767b71b user: matt tags: refactor-dbr:dbstruct | |
11:00 | some progress on unit tests check-in: 473832ad6f user: bjbarcla tags: refactor-dbr:dbstruct | |
Changes
Modified api.scm from [36f919b0c4] to [b315c63e34].
︙ | |||
132 133 134 135 136 137 138 | 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | - + - + | ;;=============================================== ;; SERVERS ((start-server) (apply server:kind-run params)) ((kill-server) (set! *server-run* #f)) ;; TESTS |
︙ | |||
186 187 188 189 190 191 192 | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | - + - + - - + + - - + + | ;; KEYS ((get-key-val-pairs) (apply db:get-key-val-pairs dbstruct params)) ((get-keys) (db:get-keys dbstruct)) ((get-key-vals) (apply db:get-key-vals dbstruct params)) ((get-targets) (db:get-targets dbstruct)) ;; ARCHIVES |
︙ |
Modified dashboard.scm from [2973414ade] to [8fcf66ed5d].
︙ | |||
214 215 216 217 218 219 220 | 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | - - + + - - + + | (define (colors-similar? color1 color2) (let* ((c1 (map string->number (string-split color1))) (c2 (map string->number (string-split color2))) (delta (map (lambda (a b)(abs (- a b))) c1 c2))) (null? (filter (lambda (x)(> x 3)) delta)))) (define (compare-tests test1 test2) |
︙ | |||
386 387 388 389 390 391 392 | 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 | - - + + - - + + | (if (< i maxn) (loop (+ i 1))))))) ;; (define (get-itemized-tests test-dats) (let ((tnames '())) (for-each (lambda (tdat) |
︙ | |||
506 507 508 509 510 511 512 | 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 | + - + + + + + + + + + + + + + + | (lambda (testname) (let ((buttondat (hash-table-ref/default *buttondat* (mkstr coln rown) #f))) (if buttondat (let* ((test (let ((matching (filter (lambda (x)(equal? (test:test-get-fullname x) testname)) testsdat))) (if (null? matching) (make-db:test id: -1 |
︙ |
Modified db.scm from [57558c8677] to [1bcfba7312].
︙ | |||
1138 1139 1140 1141 1142 1143 1144 | 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 | - + | #f (lambda (db) (sqlite3:execute db "UPDATE tests SET archived=? WHERE id=?;" archive-block-id test-id)))) ;; Look up the archive block info given a block-id ;; |
︙ | |||
2152 2153 2154 2155 2156 2157 2158 | 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 | - + - - - - - - - - - + + + + + + + + + - + - + - + | qry run-id ))) ;; (case qryvals ;; ((shortlist)(map db:test-short-record->norm res)) ;; ((#f) res) ;; (else res))))) |
︙ | |||
2625 2626 2627 2628 2629 2630 2631 | 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 | - + | ;; BB: replaced following vec construction with db:test defstruct ;;(set! res (apply vector a b))) db (conc "SELECT " db:test-record-qry-selector " FROM tests WHERE testname=? AND item_path=?;") test-name item-path) res)))) |
︙ | |||
2805 2806 2807 2808 2809 2810 2811 | 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 | - + - + | (map (lambda (key val) (conc key " like '" val "'")) keynames (string-split target "/")) " AND ")) ;; (testqry (tests:match->sqlqry testpatt)) (runsqry (sqlite3:prepare db (conc "SELECT id FROM runs WHERE " keystr " AND runname LIKE '" runname "';")))) |
︙ | |||
2918 2919 2920 2921 2922 2923 2924 | 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 | - + | ;; (case (string->symbol status) ;; ((RUNNING) (db:general-call dbdat 'top-test-set-running (list test-name))) ;; ((LAUNCHED) (db:general-call dbdat 'top-test-set (list "LAUNCHED" test-name))) ;; ((ABORT INCOMPLETE) (db:general-call dbdat 'top-test-set (list status test-name)))) ;; #f) ;; ))) |
︙ | |||
3250 3251 3252 3253 3254 3255 3256 | 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 | - + | (db:delay-if-busy count: 0)) (else (debug:print-info 0 "delaying db access due to high database load.") (thread-sleep! 12.8)))) db) "bogus result from db:delay-if-busy"))) |
︙ |
Modified gutils.scm from [628c78d614] to [49be3b47ca].
︙ | |||
19 20 21 22 23 24 25 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + | (define (gutils:colors-similar? color1 color2) (let* ((c1 (map string->number (string-split color1))) (c2 (map string->number (string-split color2))) (delta (map (lambda (a b)(abs (- a b))) c1 c2))) (null? (filter (lambda (x)(> x 3)) delta)))) (define (gutils:get-color-for-state-status state status);; #!key (get-label #f)) (cond ((not (string? state)) (debug:print 0 "ERROR: gutils:get-color-for-state-status recieved non-string state " state) (list "253 33 49" status)) ((not (string? status)) (debug:print 0 "ERROR: gutils:get-color-for-state-status recieved non-string status " status) (list "253 33 49" status)) (else |
Modified runs.scm from [cb71d2d7c9] to [a3d8939c92].
︙ | |||
1010 1011 1012 1013 1014 1015 1016 | 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 | - + | ;; convert state to symbol and use that as the hash value (for-each (lambda (trec) (let ((id (db:test-id trec)) (tn (db:test-testname trec)) (ip (db:test-item-path trec)) (st (db:test-state trec))) (if (not (equal? st "DELETED")) |
︙ | |||
1153 1154 1155 1156 1157 1158 1159 | 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 | - - + + - - - + + | (string-intersperse varval "=")) row) " ") "\n")) items))) (for-each (lambda (my-itemdat) |
︙ |
Modified tests/unittests/runs.scm from [267c3ffa13] to [e0bcac340a].
︙ | |||
117 118 119 120 121 122 123 124 125 126 127 128 129 130 | 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | + + + + | (rmt:register-test 1 "rollup" itempath) (let ((test-id (rmt:get-test-id 1 "rollup" itempath)) (comment (conc "This is a comment for itempath " itempath))) ;; (rmt:test-set-state-status-by-id run-id test-id "COMPLETED" "PASS" comment) (tests:test-set-status! 1 test-id "COMPLETED" "PASS" comment #f))) ;; #!key (work-area #f)) '("item/1" "item/2" "item/3" "item/4" "item/5")) (exit) (test #f #t (number? (rmt:get-test-id 1 "rollup" "item/4"))) (define (get-state-status run-id testname itempath) (let ((tdat (rmt:get-test-info-by-id 1 (rmt:get-test-id run-id testname itempath)))) (list (db:test-state tdat) (db:test-status tdat)))) |
︙ |