Megatest

Check-in [55d3f1d05d]
Login
Overview
Comment:wip
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.90-proper-interface-lists
Files: files | file ages | folders
SHA1: 55d3f1d05d08ea28f082ccba54ad8404fa336c49
User & Date: mrwellan on 2024-02-13 15:51:20
Other Links: branch diff | manifest | tags
Context
2024-02-13
19:30
modularized vg check-in: cc794b4f13 user: matt tags: v1.90-proper-interface-lists
15:51
wip check-in: 55d3f1d05d user: mrwellan tags: v1.90-proper-interface-lists
15:17
dashboard runs check-in: 947952bcfb user: mrwellan tags: v1.90-proper-interface-lists
Changes

Modified commonmod.scm from [60b164c1f9] to [0423da5489].

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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96

97
98
99
100
101
102
103
104
105
106

107
108
109
110
111


112
113


114
115
116

117
118

119
120
121
122
123

124
125
126

127
128
129

130
131
132
133

134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158

159
160
161
162
163
164
165
166


167
168


169
170
171
172
173
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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
     z3)

(import stml2
	)

(module commonmod
	(
	 db:testmeta-get-owner 
	 db:testmeta-get-author
	 db:testmeta-get-description
	 db:testmeta-get-reviewed
	 db:testmeta-get-tags
	 make-db:testmeta
	 
	 common:sparse-list-generate-index
	 common:lazy-sqlite-db-modification-time
	 make-sparse-array
	 sparse-array-set!
	 sparse-array-ref
	 keys->valslots
	 item-list->path
	 common:human-time
	 number-of-processes-running
	 get-normalized-cpu-load
	 common:find-local-megatest

	 common:get-intercept
	 common:get-num-cpus
	 common:get-cpu-load
	 common:hms-string->seconds
	 seconds->time-string
	 common:get-megatest-exe

	 megatest-version
	 common:get-toppath
	 common:generic-ssh
	 common:file-exists?
	 common:with-env-vars
	 common:nice-path
	 common:get-fields

	 common:get-normalized-cpu-load
	 common:unix-ping
	 common:get-normalized-cpu-load
	 common:raw-get-remote-host-load
	 common:to-alist

	 ;; globals

	 *common:badly-ended-states*
	 *common:dont-roll-up-states*
	 *common:ended-states*
	 *common:not-started-ok-statuses*
	 *common:running-states*
	 *common:std-states*
	 *common:std-statuses*
	 *common:well-ended-states*
	 *configdat*
	 *configinfo*

	 *db-access-allowed*
	 *db-api-call-time*
	 *db-cache-path*
	 *db-keys*
	 *default-area-tag*


	 *host-loads*
	 *keyvals*


	 *logged-in-clients*
	 *my-client-signature*
	 *on-exit-procs*

	 *pkts-info*
	 *pre-reqs-met-cache*

	 *runremote*
	 *server-id*
	 *server-info*
	 *target*
	 *task-db*

	 *testconfigs*
	 *time-to-exit*
	 *toppath*

	 *transport-type*
	 
	 any->number-if-possible


	 common:special-sort
	 keys:target-set-args


	 getenv
	 setenv
	 safe-setenv

	 commonmod:get-cpu-load

	 get-area-path-signature
	 common:simple-file-lock
	 common:low-noise-print
	 common:get-create-writeable-dir
	 common:real-path
	 val->alist

	 client:get-signature

	 common:get-color-from-status
	 
	 seconds->year-work-week/day-time
	 common:simple-file-release-lock
	 common:simple-file-lock-and-wait
	 tests:lookup-itemmap

	 tests:match->sqlqry
	 runs:get-std-run-fields
	 common:min-max

	 common:max
	 common:sum
	 keys:target->keyval
	 db:patt->like

	 rmt:transport-mode
	 common:version-signature



	 keys->keystr
	 keys:config-get-fields


	 common:make-tmpdir-name

	 db:test-get-status
	 db:test-get-state
	 db:test-get-event_time
	 db:test-get-item-path
	 db:test-get-testname
	 db:test-get-id
	 db:test-get-comment
	 db:test-get-run_duration
	 db:test-get-rundir

	 tests:match
	 patt-list-match
	 common:pkts-spec










	 sdb:qry










	 seconds->work-week/day-time
	 seconds->work-week/day














	 tdb:step-get-comment
	 seconds->hr-min-sec
	 any->number
	 tdb:step-get-logfile

	 tdb:step-get-event_time











	 tdb:step-get-status
	 tdb:step-get-state
	 tdb:step-get-id
	 tdb:step-get-stepname
	 db:test-make-full-name



	 common:htree->html

















	 common:list->htree








































	 tdb:steps-table-get-log-file
	 tdb:steps-table-get-runtime
	 tdb:steps-table-get-status
	 tdb:steps-table-get-end
	 tdb:steps-table-get-start
	 tdb:steps-table-get-stepname
	 tdb:step-get-last_update
	 tdb:step-get-test_id



	 db:test-get-run_id
	 db:test-get-final_logf

	 tests:testqueue-get-item_path
	 tests:testqueue-get-itemdat
	 tests:testqueue-get-testname
	 tests:testqueue-get-priority
	 tests:testqueue-set-priority!
	 tests:testqueue-get-testconfig
	 tests:testqueue-get-waitons

	 tasks:wait-on-journal
	 common:get-area-path-signature

	 db:test-get-last_update
	 db:test-get-archived
	 db:test-get-uname
	 db:test-get-diskfree
	 db:test-get-cpuload
	 db:test-get-process_id
	 db:test-get-host
	 db:test-data-get-last_update
	 db:test-data-get-type
	 db:test-data-get-status
	 db:test-data-get-comment
	 db:test-data-get-units
	 db:test-data-get-tol
	 db:test-data-get-expected
	 db:test-data-get-value
	 db:test-data-get-variable
	 db:test-data-get-category
	 db:test-data-get-test_id
	 db:test-data-get-id

	 host-last-cpuload
	 host-last-update
	 host-last-cpuload-set!
	 host-last-update-set!
	 host-reachable-set!
	 make-host
	 host-last-used-set!
	 host-reachable
	 host-last-used

	 common:alist-ref/default
	 common:val->alist
	 common:in-running-test?
	 
	 common:without-vars
	 common:get-megatest-exe-path
	 common:get-megatest-exe-dir
	 common:get-param-mapping
	 common:get-mtexe
	 
	 db:test-get-is-toplevel
	 seconds->quarter
	 *globalexitstatus*

	 tests:testqueue-set-items!
	 tests:testqueue-get-items
	 *runconfigdat*
	 *passnum*
	 *already-seen-runconfig-info*
	 common:directory-writable?
	 common:dir-clean-up
	 common:fail-safe
	 common:list-or-null
	 *toptest-paths*
	 common:directory-exists?
	 *configstatus*
	 *last-launch*
	 *launch-setup-mutex*
	 commonmod:is-test-alive
	 alist->env-vars
	 *env-vars-by-run-id*
	 common:get-signature
	 common:join-backgrounded-threads
	 tests:glob-like-match
	 common:send-thunk-to-background-thread
	 db:test-get-fullname
	 common:clear-caches
	 db:mintest-get-event_time
	 *test-meta-updated*
	 tests:testqueue-set-item_path!
	 tests:testqueue-set-itemdat!
	 make-tests:testqueue

	 megatest-fossil-hash

	 common:steps-can-proceed-given-status-sym
	 status-sym->string
	 common:worse-status-sym
	 common:logpro-exit-code->status-sym

	 save-environment-as-files
	 assoc/default
	 common:read-encoded-string
	 common:which

	 stop-the-train
	 )
	
(import scheme)
(cond-expand
 (chicken-4
  
  (import chicken







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<

>










>





>
>


>
>



>


>





>



>

|
<
>

|
|
|
>
|
|
<
|
|
|
<
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
>
>
|
|
>
>

|
<
<
<
<
<
<
|
<
<
|
<
<

|
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
|
<
<
|
>
|
>
>
>
>
>
>
>
>
>
>
>
|
|
|
|

>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
>
>
>
>
>
>
>
|
|
|
|
|

<
<
|
>
>
|
|



|

|
|

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
<
|
<
|
<
<
<
<
<
<
<
<
<
<
<







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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98

99
100
101
102
103
104
105
106

107
108
109

110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144






145


146


147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272


273
274
275
276
277
278
279
280
281
282
283
284
285
















































286
287























288
289

290

291











292
293
294
295
296
297
298
     z3)

(import stml2
	)

(module commonmod
	(








































	 ;; globals
	 *already-seen-runconfig-info*
	 *common:badly-ended-states*
	 *common:dont-roll-up-states*
	 *common:ended-states*
	 *common:not-started-ok-statuses*
	 *common:running-states*
	 *common:std-states*
	 *common:std-statuses*
	 *common:well-ended-states*
	 *configdat*
	 *configinfo*
	 *configstatus*
	 *db-access-allowed*
	 *db-api-call-time*
	 *db-cache-path*
	 *db-keys*
	 *default-area-tag*
	 *env-vars-by-run-id*
	 *globalexitstatus*
	 *host-loads*
	 *keyvals*
	 *last-launch*
	 *launch-setup-mutex*
	 *logged-in-clients*
	 *my-client-signature*
	 *on-exit-procs*
	 *passnum*
	 *pkts-info*
	 *pre-reqs-met-cache*
	 *runconfigdat*
	 *runremote*
	 *server-id*
	 *server-info*
	 *target*
	 *task-db*
	 *test-meta-updated*
	 *testconfigs*
	 *time-to-exit*
	 *toppath*
	 *toptest-paths*
	 *transport-type*


	 *common:this-exe-dir*

	 common:with-orig-env
	 alist->env-vars
	 any->number
	 any->number-if-possible
	 assoc/default
	 client:get-signature

	 
	 common:alist-ref/default
	 common:clear-caches

	 common:dir-clean-up
	 common:directory-exists?
	 common:directory-writable?
	 common:fail-safe
	 common:file-exists?
	 common:find-local-megatest
	 common:generic-ssh
	 common:get-area-path-signature
	 common:get-color-from-status
	 common:get-cpu-load
	 common:get-create-writeable-dir
	 common:get-fields
	 common:get-intercept
	 common:get-megatest-exe
	 common:get-megatest-exe-dir
	 common:get-megatest-exe-path
	 common:get-mtexe
	 common:get-normalized-cpu-load
	 common:get-normalized-cpu-load
	 common:get-num-cpus
	 common:get-param-mapping
	 common:get-signature
	 common:get-toppath
	 common:hms-string->seconds
	 common:htree->html
	 common:human-time
	 common:in-running-test?
	 common:join-backgrounded-threads
	 common:lazy-sqlite-db-modification-time
	 common:list->htree
	 common:list-or-null
	 common:logpro-exit-code->status-sym
	 common:low-noise-print
	 common:make-tmpdir-name
	 common:max






	 common:min-max


	 common:nice-path


	 common:pkts-spec
	 common:raw-get-remote-host-load
	 common:read-encoded-string
	 common:real-path
	 common:send-thunk-to-background-thread
	 common:simple-file-lock
	 common:simple-file-lock-and-wait
	 common:simple-file-release-lock
	 common:sparse-list-generate-index
	 common:special-sort
	 common:steps-can-proceed-given-status-sym
	 common:sum
	 common:to-alist
	 common:unix-ping
	 common:val->alist
	 common:version-signature
	 common:which
	 common:with-env-vars
	 common:without-vars
	 common:worse-status-sym
	 commonmod:get-cpu-load
	 commonmod:is-test-alive
	 db:mintest-get-event_time
	 db:patt->like
	 
	 db:test-data-get-category
	 db:test-data-get-comment
	 db:test-data-get-expected
	 db:test-data-get-id
	 db:test-data-get-last_update
	 db:test-data-get-status
	 db:test-data-get-test_id
	 db:test-data-get-tol
	 db:test-data-get-type
	 db:test-data-get-units
	 db:test-data-get-value
	 db:test-data-get-variable
	 db:test-get-archived
	 db:test-get-comment


	 db:test-get-cpuload
	 db:test-get-diskfree
	 db:test-get-event_time
	 db:test-get-final_logf
	 db:test-get-fullname
	 db:test-get-host
	 db:test-get-id
	 db:test-get-is-toplevel
	 db:test-get-item-path
	 db:test-get-last_update
	 db:test-get-process_id
	 db:test-get-run_duration
	 db:test-get-run_id
	 db:test-get-rundir
	 db:test-get-state
	 db:test-get-status
	 db:test-get-testname
	 db:test-get-uname
	 db:test-make-full-name
	 db:test-set-state!
	 db:test-set-status!
	 db:test-set-testname!
	 
	 db:testmeta-get-author
	 db:testmeta-get-description
	 db:testmeta-get-owner
	 db:testmeta-get-reviewed
	 db:testmeta-get-tags
	 
	 get-area-path-signature
	 get-normalized-cpu-load
	 getenv
	 host-last-cpuload
	 host-last-cpuload-set!
	 host-last-update
	 host-last-update-set!
	 host-last-used
	 host-last-used-set!
	 host-reachable
	 host-reachable-set!
	 item-list->path
	 keys->keystr
	 keys->valslots
	 keys:config-get-fields
	 keys:target->keyval
	 keys:target-set-args
	 make-db:testmeta
	 make-host
	 make-sparse-array
	 make-tests:testqueue
	 megatest-fossil-hash
	 megatest-version
	 number-of-processes-running
	 patt-list-match
	 rmt:transport-mode
	 runs:get-std-run-fields
	 safe-setenv
	 save-environment-as-files
	 sdb:qry
	 seconds->hr-min-sec
	 seconds->quarter
	 seconds->time-string
	 seconds->work-week/day
	 seconds->work-week/day-time
	 seconds->year-work-week/day-time
	 setenv
	 sparse-array-ref
	 sparse-array-set!
	 status-sym->string
	 stop-the-train
	 tasks:wait-on-journal
	 
	 tdb:step-get-comment
	 tdb:step-get-event_time
	 tdb:step-get-id
	 tdb:step-get-last_update
	 tdb:step-get-logfile
	 tdb:step-get-state
	 tdb:step-get-status
	 tdb:step-get-stepname
	 tdb:step-get-test_id
	 tdb:steps-table-get-end
	 tdb:steps-table-get-log-file
	 tdb:steps-table-get-runtime
	 tdb:steps-table-get-start
	 tdb:steps-table-get-status
	 tdb:steps-table-get-stepname


	 
	 tests:glob-like-match
	 tests:lookup-itemmap
	 tests:match
	 tests:match->sqlqry

	 tests:testqueue-get-item_path
	 tests:testqueue-get-itemdat
	 tests:testqueue-get-items
	 tests:testqueue-get-priority
	 tests:testqueue-get-testconfig
	 tests:testqueue-get-testname
	 tests:testqueue-get-waitons
















































	 tests:testqueue-set-item_path!
	 tests:testqueue-set-itemdat!























	 tests:testqueue-set-items!
	 tests:testqueue-set-priority!

	 

	 val->alist











	 )
	
(import scheme)
(cond-expand
 (chicken-4
  
  (import chicken
541
542
543
544
545
546
547

548
549
550
551
552
553
554
                 (string-match "^(.*/csi|csi)$" (car argv))
                 (string-match "^-(s|ss|sx|script)$" (cadr argv)))
            (caddr argv))
           (else (car argv))))
         (fullpath (realpath this-script)))
    fullpath))


;;======================================================================

(define *common:this-exe-fullpath* (common:get-this-exe-fullpath))
(define *common:this-exe-dir*      (pathname-directory *common:this-exe-fullpath*))
(define *common:this-exe-name*     (pathname-strip-directory *common:this-exe-fullpath*))

(define (common:get-sync-lock-filepath)







>







522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
                 (string-match "^(.*/csi|csi)$" (car argv))
                 (string-match "^-(s|ss|sx|script)$" (cadr argv)))
            (caddr argv))
           (else (car argv))))
         (fullpath (realpath this-script)))
    fullpath))

;; get rid of these, no need to slow down start up
;;======================================================================

(define *common:this-exe-fullpath* (common:get-this-exe-fullpath))
(define *common:this-exe-dir*      (pathname-directory *common:this-exe-fullpath*))
(define *common:this-exe-name*     (pathname-strip-directory *common:this-exe-fullpath*))

(define (common:get-sync-lock-filepath)

Modified rmtmod.scm from [dd52b41e4b] to [346ee7beb2].

27
28
29
30
31
32
33

34
35
36
37
38
39
40
(declare (uses mtmod))
(declare (uses tcp-transportmod))
(declare (uses apimod))
(declare (uses servermod))

(module rmtmod
	(

	 rmt:read-test-data
	 rmt:get-targets
	 rmt:get-run-stats
	 rmt:get-key-vals
	 rmt:test-data-rollup
	 rmt:import-sexpr
	 rmt:read-test-data-varpatt







>







27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
(declare (uses mtmod))
(declare (uses tcp-transportmod))
(declare (uses apimod))
(declare (uses servermod))

(module rmtmod
	(
	 rmt:tasks-get-last
	 rmt:read-test-data
	 rmt:get-targets
	 rmt:get-run-stats
	 rmt:get-key-vals
	 rmt:test-data-rollup
	 rmt:import-sexpr
	 rmt:read-test-data-varpatt

Modified runsmod.scm from [63f920fb0b] to [b2ba9c7ca3].

43
44
45
46
47
48
49

50
51
52
53
54
55
56
(declare (uses archivemod))
(declare (uses fsmod))

(use srfi-69)

(module runsmod
	(

	 runs:clean-cache
	 rmt:find-and-mark-incomplete
	 launch:setup
	 launch:end-of-run-check
	 launch:test-copy

	 set-item-env-vars







>







43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
(declare (uses archivemod))
(declare (uses fsmod))

(use srfi-69)

(module runsmod
	(
	 setup-env-defaults
	 runs:clean-cache
	 rmt:find-and-mark-incomplete
	 launch:setup
	 launch:end-of-run-check
	 launch:test-copy

	 set-item-env-vars