40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
ports
commonmod
)
;; (import debugprint)
;;======================================================================
;; R E C O R D S
;;======================================================================
;; a single Megatest area with it's multiple dbs is
;; managed in a dbstruct
;;
|
>
>
>
>
|
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
ports
commonmod
)
;; (import debugprint)
;; Parameters
(define num-run-dbs (make-parameter 10))
;;======================================================================
;; R E C O R D S
;;======================================================================
;; a single Megatest area with it's multiple dbs is
;; managed in a dbstruct
;;
|
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
|
(define (db:dbname->path apath dbname)
(conc apath"/"dbname))
;; POTENTIAL BUG: this implementation could produce a db file if run-id is neither #f or a number
(define (dbfile:run-id->dbname run-id)
(cond
((number? run-id) (conc ".megatest/" (modulo run-id 100) ".db"))
((not run-id) (conc ".megatest/main.db"))
(else run-id)))
;; Make the dbstruct, setup up auxillary db's and call for main db at least once
;;
;; called in http-transport and replicated in rmt.scm for *local* access.
;;
|
|
|
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
|
(define (db:dbname->path apath dbname)
(conc apath"/"dbname))
;; POTENTIAL BUG: this implementation could produce a db file if run-id is neither #f or a number
(define (dbfile:run-id->dbname run-id)
(cond
((number? run-id) (conc ".megatest/" (modulo run-id (num-run-dbs)) ".db"))
((not run-id) (conc ".megatest/main.db"))
(else run-id)))
;; Make the dbstruct, setup up auxillary db's and call for main db at least once
;;
;; called in http-transport and replicated in rmt.scm for *local* access.
;;
|