Overview
Comment: | Partial port of db.scm to new method |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | db-to-testdb |
Files: | files | file ages | folders |
SHA1: |
67ee916e9c3cee10e1761810dc84413d |
User & Date: | matt on 2013-10-28 18:29:28 |
Other Links: | branch diff | manifest | tags |
Context
2013-10-28
| ||
19:31 | Half done. Non-compileable state Closed-Leaf check-in: 2ac30a15f0 user: matt tags: db-to-testdb | |
18:29 | Partial port of db.scm to new method check-in: 67ee916e9c user: matt tags: db-to-testdb | |
18:02 | Moving test specific data to testdat.db check-in: a65b1fd118 user: matt tags: db-to-testdb | |
Changes
Modified db.scm from [08bbfdd684] to [0f8b8905f4].
︙ | |||
174 175 176 177 178 179 180 | 174 175 176 177 178 179 180 181 182 183 184 185 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 | - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - + - | "CONSTRAINT runsconstraint UNIQUE (runname" (if havekeys "," "") keystr "));")) (sqlite3:execute db (conc "CREATE INDEX runs_index ON runs (runname" (if havekeys "," "") keystr ");")) (sqlite3:execute db "CREATE TABLE IF NOT EXISTS tests (id INTEGER PRIMARY KEY, run_id INTEGER, testname TEXT, |
︙ | |||
971 972 973 974 975 976 977 978 979 980 981 982 983 984 | 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 | + + + + + + + + + + + + + + + + + + - - + + + + | (thekey (string-intersperse (map (lambda (x)(if x x "-na-")) keyvals) "/"))) (hash-table-set! *target* run-id thekey) thekey)))) ;;====================================================================== ;; T E S T S ;;====================================================================== ;; Get minimal list of tests data from central db ;; ;; fields are: id, run_id, testname, item_path, rundir_id, linkdir_id, event_time, fail_count, pass_count ;; (define (db:get-central-test-data-for-run-id db run-id testpatt) (let ((res '()) (tests-match-qry (tests:match->sqlqry testpatt))) (sqlite3:for-each-row (lambda (a . b) (set! res (cons (apply vector a b)) res)) db (conc "SELECT id,run_id,testname,item_path,rundir_id,linkdir_id,event_time,fail_count,pass_count WHERE run_id=? " (if tests-match-query (conc " AND " tests-match-qry) "") ";")) (reverse res))) ;; states and statuses are lists, turn them into ("PASS","FAIL"...) and use NOT IN ;; i.e. these lists define what to NOT show. ;; states and statuses are required to be lists, empty is ok ;; not-in #t = above behaviour, #f = must match (define (db:get-tests-for-run db run-id testpatt states statuses offset limit not-in sort-by sort-order #!key |
︙ |