Overview
Comment: | Added support for all sync modes |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | test-specific-db |
Files: | files | file ages | folders |
SHA1: |
1ffce442dc7e7e6aa9c52b2850cfa71a |
User & Date: | matt on 2012-09-26 19:35:00 |
Other Links: | branch diff | manifest | tags |
Context
2012-09-26
| ||
21:17 | Tentatively turning on test-id caching check-in: f16f55cefe user: matt tags: test-specific-db | |
19:35 | Added support for all sync modes check-in: 1ffce442dc user: matt tags: test-specific-db | |
17:42 | All good on re-running as needed check-in: 5f3e0473cf user: matt tags: test-specific-db | |
Changes
Modified db.scm from [97c258d9ea] to [22f83e1857].
︙ | ︙ | |||
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | ;; timestamp type (val1 val2 ...) ;; type: meta-info, step (define *incoming-data* '()) (define *incoming-last-time* (current-seconds)) (define *incoming-mutex* (make-mutex)) (define *cache-on* #f) (define (open-db) ;; (conc *toppath* "/megatest.db") (car *configinfo*))) (let* ((dbpath (conc *toppath* "/megatest.db")) ;; fname) (dbexists (file-exists? dbpath)) (db (sqlite3:open-database dbpath)) ;; (never-give-up-open-db dbpath)) (handler (make-busy-timeout (if (args:get-arg "-override-timeout") (string->number (args:get-arg "-override-timeout")) 36000)))) ;; 136000))) (debug:print 4 "INFO: dbpath=" dbpath) (sqlite3:set-busy-handler! db handler) (if (not dbexists) (db:initialize db)) | > > > > > > > > > > > > > > > > > > < < < | < < | | 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 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | ;; timestamp type (val1 val2 ...) ;; type: meta-info, step (define *incoming-data* '()) (define *incoming-last-time* (current-seconds)) (define *incoming-mutex* (make-mutex)) (define *cache-on* #f) (define (db:set-sync db) (let* ((syncval (config-lookup *configdat* "setup" "synchronous")) (val (cond ;; 0 | OFF | 1 | NORMAL | 2 | FULL; ((not syncval) #f) ((string->number syncval) (let ((val (string->number syncval))) (if (member val '(0 1 2)) val #f))) ((string-match (regexp "yes" #t) syncval) 1) ((string-match (regexp "no" #t) syncval) 0) ((string-match (regexp "(off|normal|full)" #t) syncval) syncval) (else (debug:print 0 "ERROR: synchronous must be 0,1,2,OFF,NORMAL or FULL, you provided: " syncval) #f)))) (if val (begin (debug:print 2 "INFO: Setting pragma synchronous to " val) (sqlite3:execute db (conc "PRAGMA synchronous = '" val "';")))))) (define (open-db) ;; (conc *toppath* "/megatest.db") (car *configinfo*))) (let* ((dbpath (conc *toppath* "/megatest.db")) ;; fname) (dbexists (file-exists? dbpath)) (db (sqlite3:open-database dbpath)) ;; (never-give-up-open-db dbpath)) (handler (make-busy-timeout (if (args:get-arg "-override-timeout") (string->number (args:get-arg "-override-timeout")) 36000)))) ;; 136000))) (debug:print 4 "INFO: dbpath=" dbpath) (sqlite3:set-busy-handler! db handler) (if (not dbexists) (db:initialize db)) (db:set-sync db) db)) (define (open-run-close proc idb . params) (let* ((db (if idb idb (open-db))) (res #f)) (db:set-sync db) (set! res (apply proc db params)) (if (not idb)(sqlite3:finalize! db)) res)) (define *global-delta* 0) (define *last-global-delta-printed* 0) (define (open-run-close-measure proc idb . params) |
︙ | ︙ | |||
1262 1263 1264 1265 1266 1267 1268 | '() (let* ((unmet-pre-reqs '()) (result '())) (for-each (lambda (waitontest-name) ;; by getting the tests with matching name we are looking only at the matching test ;; and related sub items | | | 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 | '() (let* ((unmet-pre-reqs '()) (result '())) (for-each (lambda (waitontest-name) ;; by getting the tests with matching name we are looking only at the matching test ;; and related sub items (let ((tests (db:get-tests-for-run db run-id waitontest-name #f '() '())) (ever-seen #f) (parent-waiton-met #f) (item-waiton-met #f)) (for-each (lambda (test) ;; (if (equal? waitontest-name (db:test-get-testname test)) ;; by defintion this had better be true ... (let* ((state (db:test-get-state test)) |
︙ | ︙ |
Modified tests/fullrun/megatest.config from [83d39655d9] to [af4aa77cd5].
1 2 3 4 5 6 7 8 9 10 11 12 13 | [fields] sysname TEXT fsname TEXT datapath TEXT # refareas can be searched to find previous runs # the path points to where megatest.db exists [refareas] area1 /tmp/oldarea/megatest [include config/mt_include_1.config] [setup] | > | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | [fields] sysname TEXT fsname TEXT datapath TEXT # refareas can be searched to find previous runs # the path points to where megatest.db exists [refareas] area1 /tmp/oldarea/megatest [include config/mt_include_1.config] [setup] # FULL or 2, NORMAL or 1, OFF or 0 synchronous FULL throttle 50 [validvalues] state start end status pass fail n/a 0 1 running # These are set before all tests, override them |
︙ | ︙ |