15
16
17
18
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
;;
;; You should have received a copy of the GNU General Public License
;; along with Megatest. If not, see <http://www.gnu.org/licenses/>.
;;======================================================================
(declare (unit keysmod))
(declare (uses mtargs))
(declare (uses debugprint))
;; (declare (uses configfmod))
;; (declare (uses commonmod))
(module keysmod
*
(import scheme
chicken.base
chicken.condition
chicken.file
chicken.io
chicken.pathname
chicken.port
chicken.pretty-print
chicken.process
chicken.process-context
chicken.sort
chicken.string
chicken.time
debugprint
mtargs
pkts
(prefix base64 base64:)
(prefix dbi dbi:)
(prefix sqlite3 sqlite3:)
(srfi 18)
directory-utils
format
matchable
md5
message-digest
regex
regex-case
sparse-vectors
srfi-1
srfi-13
srfi-69
stack
typed-records
z3
configfmod
;; commonmod
)
;;======================================================================
;; Run keys, these are used to hierarchially organise tests and run areas
;;======================================================================
;; (use sqlite3 srfi-1 posix regex regex-case srfi-69)
|
>
|
<
<
<
<
<
|
|
>
|
15
16
17
18
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
63
64
65
66
67
68
69
70
71
72
73
|
;;
;; You should have received a copy of the GNU General Public License
;; along with Megatest. If not, see <http://www.gnu.org/licenses/>.
;;======================================================================
(declare (unit keysmod))
(declare (uses mtargs))
(declare (uses debugprint))
(module keysmod
*
(import scheme
chicken.base
chicken.condition
chicken.file
chicken.io
chicken.pathname
chicken.port
chicken.pretty-print
chicken.process
chicken.process-context
chicken.sort
chicken.string
chicken.time
(prefix base64 base64:)
(prefix dbi dbi:)
(prefix sqlite3 sqlite3:)
(srfi 18)
directory-utils
format
matchable
md5
message-digest
regex
regex-case
sparse-vectors
srfi-1
srfi-13
srfi-69
stack
typed-records
z3
debugprint
mtargs
pkts
)
;;======================================================================
;; Run keys, these are used to hierarchially organise tests and run areas
;;======================================================================
;; (use sqlite3 srfi-1 posix regex regex-case srfi-69)
|
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
;; The setting of :keyfield in args should be turned off ASAP
;;
(define (keys:target-set-args keys target ht)
(if target
(let ((vals (string-split target "/")))
(if (eq? (length vals)(length keys))
(for-each (lambda (key val)
(setenv key val)
(if ht (hash-table-set! ht (conc ":" key) val)))
keys
vals)
(debug:print-error 0 *default-log-port* "wrong number of values in " target ", should match " keys))
vals)
(debug:print 4 *default-log-port* "ERROR: keys:target-set-args called with no target.")))
|
|
|
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
;; The setting of :keyfield in args should be turned off ASAP
;;
(define (keys:target-set-args keys target ht)
(if target
(let ((vals (string-split target "/")))
(if (eq? (length vals)(length keys))
(for-each (lambda (key val)
(set-environment-variable! key val)
(if ht (hash-table-set! ht (conc ":" key) val)))
keys
vals)
(debug:print-error 0 *default-log-port* "wrong number of values in " target ", should match " keys))
vals)
(debug:print 4 *default-log-port* "ERROR: keys:target-set-args called with no target.")))
|