Megatest

Check-in [6f94e8e6e3]
Login
Overview
Comment:Added export lists to some modules
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.6584-nanomsg
Files: files | file ages | folders
SHA1: 6f94e8e6e3673ee4cae5ca4a8246936efa922e7e
User & Date: matt on 2021-11-10 20:32:52
Other Links: branch diff | manifest | tags
Context
2021-11-10
21:17
compilation clean up check-in: b6ea6cc3d4 user: matt tags: v1.6584-nanomsg
20:32
Added export lists to some modules check-in: 6f94e8e6e3 user: matt tags: v1.6584-nanomsg
06:20
wip check-in: 71e57ac100 user: matt tags: v1.6584-nanomsg
Changes

Modified apimod.scm from [ae14dbd62a] to [d5b17eca2f].

22
23
24
25
26
27
28
29







30
31
32
33
34
35
36
22
23
24
25
26
27
28

29
30
31
32
33
34
35
36
37
38
39
40
41
42







-
+
+
+
+
+
+
+







(declare (uses commonmod))
(declare (uses dbmod))
(declare (uses debugprint))
(declare (uses tasksmod))
(declare (uses servermod))

(module apimod
	*
  (
api:run-server-process
api:start-server
api:dispatch-cmd
api:execute-requests
api:process-request
)
	
(import scheme
	chicken.base
	chicken.process-context.posix
	chicken.string
	chicken.time
	chicken.condition

Modified archivemod.scm from [13152d30be] to [9241640f45].

31
32
33
34
35
36
37















38

39
40
41
42
43
44
45
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







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+







(declare (uses dbmod))
(declare (uses rmtmod))
(declare (uses launchmod))
(declare (uses processmod))
(declare (uses servermod))

(module archivemod
	   (
archive:get-archive-disks
archive:get-archive
archive:allocate-new-archive-block
archive:run-bup
archive:megatest-db
archive:restore-db
archive:ls->list
time-string->seconds
seconds->std-time-str
archive:get-timestamp-dir
archive:bup-restore
common:get-youngest-test
archive:bup-get-data
)
	*

	
(import scheme
	(prefix sqlite3 sqlite3:)
	chicken.base
	chicken.condition
	chicken.file
	chicken.file.posix

Modified commonmod.scm from [2a172336a9] to [13a561f78c].

29
30
31
32
33
34
35
































































































































































































































































































































































































































36




























































37
38
39
40
41
42
43
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
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
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451

452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+







(declare (uses hostinfo))
(declare (uses keysmod))

;; odd but it works?
;; (declare (uses itemsmod))

(module commonmod
	   (
make-db:test
db:test-get-id
db:test-get-run_id
db:test-get-testname
db:test-get-state
db:test-get-status
db:test-get-event_time
db:test-get-host
db:test-get-cpuload
db:test-get-diskfree
db:test-get-uname
db:test-get-rundir
db:test-get-item-path
db:test-get-run_duration
db:test-get-final_logf
db:test-get-comment
db:test-get-process_id
db:test-get-archived
db:test-get-last_update
db:test-get-fullname
db:test-make-full-name
db:test-get-first_err
db:test-get-first_warn
db:test-set-cpuload!
db:test-set-diskfree!
db:test-set-testname!
db:test-set-state!
db:test-set-status!
db:test-set-run_duration!
db:test-set-final_logf!
db:test-get-is-toplevel
make-db:mintest
db:mintest-get-id
db:mintest-get-run_id
db:mintest-get-testname
db:mintest-get-state
db:mintest-get-status
db:mintest-get-event_time
db:mintest-get-item_path
make-db:testmeta
db:testmeta-get-id
db:testmeta-get-testname
db:testmeta-get-author
db:testmeta-get-owner
db:testmeta-get-description
db:testmeta-get-reviewed
db:testmeta-get-iterated
db:testmeta-get-avg_runtime
db:testmeta-get-avg_disk
db:testmeta-get-tags
db:testmeta-set-id!
db:testmeta-set-testname!
db:testmeta-set-author!
db:testmeta-set-owner!
db:testmeta-set-description!
db:testmeta-set-reviewed!
db:testmeta-set-iterated!
db:testmeta-set-avg_runtime!
db:testmeta-set-avg_disk!
make-db:test-data
db:test-data-get-id
db:test-data-get-test_id
db:test-data-get-category
db:test-data-get-variable
db:test-data-get-value
db:test-data-get-expected
db:test-data-get-tol
db:test-data-get-units
db:test-data-get-comment
db:test-data-get-status
db:test-data-get-type
db:test-data-get-last_update
db:test-data-set-id!
db:test-data-set-test_id!
db:test-data-set-category!
db:test-data-set-variable!
db:test-data-set-value!
db:test-data-set-expected!
db:test-data-set-tol!
db:test-data-set-units!
db:test-data-set-comment!
db:test-data-set-status!
db:test-data-set-type!
make-db:step
tdb:step-get-id
tdb:step-get-test_id
tdb:step-get-stepname
tdb:step-get-state
tdb:step-get-status
tdb:step-get-event_time
tdb:step-get-logfile
tdb:step-get-comment
tdb:step-get-last_update
tdb:step-set-id!
tdb:step-set-test_id!
tdb:step-set-stepname!
tdb:step-set-state!
tdb:step-set-status!
tdb:step-set-event_time!
tdb:step-set-logfile!
tdb:step-set-comment!
make-db:steps-table
tdb:steps-table-get-stepname
tdb:steps-table-get-start
tdb:steps-table-get-end
tdb:steps-table-get-status
tdb:steps-table-get-runtime
tdb:steps-table-get-log-file
tdb:step-stable-set-stepname!
tdb:step-stable-set-start!
tdb:step-stable-set-end!
tdb:step-stable-set-status!
tdb:step-stable-set-runtime!
make-cdb:packet
cdb:packet-get-client-sig
cdb:packet-get-qtype
cdb:packet-get-immediate
cdb:packet-get-query-sig
cdb:packet-get-params
cdb:packet-get-qtime
cdb:packet-set-client-sig!
cdb:packet-set-qtype!
cdb:packet-set-immediate!
cdb:packet-set-query-sig!
cdb:packet-set-params!
cdb:packet-set-qtime!
runs:runrec-make-record
runs:runrec-get-target
runs:runrec-get-runname
runs:runrec-testpatt
runs:runrec-keys
runs:runrec-keyvals
runs:runrec-environment
runs:runrec-mconfig
runs:runrec-runconfig
runs:runrec-serverdat
runs:runrec-transport
runs:runrec-db
runs:runrec-top-path
runs:runrec-run_id
test:get-id
test:get-run_id
test:get-test-name
test:get-state
test:get-status
test:get-item-path
test:test-get-fullname
make-and-init-bigdata
call-with-environment-variables
common:simple-file-lock
common:simple-file-lock-and-wait
common:simple-file-release-lock
common:fail-safe
get-file-descriptor-count
common:get-this-exe-fullpath
common:get-sync-lock-filepath
common:find-local-megatest
common:logpro-exit-code->status-sym
common:worse-status-sym
common:steps-can-proceed-given-status-sym
status-sym->string
common:logpro-exit-code->test-status
common:clear-caches
common:get-full-version
common:version-signature
common:snapshot-file
common:rotate-logs
make-sparse-array
sparse-array?
sparse-array-ref
sparse-array-set!
common:db-block-further-queries
common:db-access-allowed?
common:to-alist
common:alist-ref/default
common:low-noise-print
common:get-megatest-exe
common:read-encoded-string
common:special-sort
get-with-default
assoc/default
common:get-area-name
common:get-toppath
common:get-db-tmp-area
common:get-signature
common:get-area-path-signature
common:calc-area-key
common:get-area-key
common:human-time
std-signal-handler
special-signal-handler
any->number
any->number-if-possible
patt-list-match
common:get-disks
common:which
common:get-install-area
common:get-create-writeable-dir
common:get-youngest
common:bash-glob
common:list-or-null
common:get-runconfig-targets
common:args-get-state
common:args-get-status
common:args-get-testpatt
common:false-on-exception
common:file-exists?
common:directory-exists?
common:directory-writable?
common:get-linktree
common:args-get-runname
common:args-get-target
common:get-full-test-name
common:use-cache?
common:force-server?
common:list-is-sublist
common:max
common:min-max
common:sum
common:list->htree
common:htree->html
common:htree->atree
common:sparse-list-generate-index
common:lazy-convert
common:val->alist
common:lazy-modification-time
common:lazy-sqlite-db-modification-time
common:get-intercept
common:get-delay
common:print-delay-table
get-cpu-load
common:get-cached-info
common:write-cached-info
common:raw-get-remote-host-load
common:get-cpu-load
common:get-normalized-cpu-load
common:get-normalized-cpu-load-raw
common:unix-ping
launch:is-test-alive
common:get-num-cpus
common:wait-for-normalized-load
common:wait-for-cpuload
tasks:kill-server
server:get-logs-list
server:get-list
server:get-num-alive
server:get-best
server:get-first-best
server:get-rand-best
server:record->id
server:get-num-servers
server:logf-get-start-info
get-uname
realpath
common:real-path
common:get-disk-space-used
get-df
get-free-inodes
get-unix-df
get-unix-inodes
common:check-space-in-dir
common:check-db-dir-space
common:check-db-dir-and-exit-if-insufficient
common:get-disk-with-most-free-space
common:spec-string->list-of-specs
common:file-find-rule
common:dir-clean-up
bb-check-path
save-environment-as-files
common:get-param-mapping
alist->env-vars
get-the-original-environment
common:with-orig-env
common:without-vars
common:run-a-command
common:hms-string->seconds
seconds->hr-min-sec
seconds->time-string
seconds->work-week/day-time
seconds->work-week/day
seconds->year-work-week/day
seconds->year-work-week/day-time
seconds->year-week/day-time
seconds->quarter
common:date-time->seconds
common:find-start-mark-and-mark-delta
common:expand-cron-slash
common:cron-expand
common:cron-event
common:extended-cron
common:name->iup-color
common:iup-color->rgb-hex
common:in-running-test?
common:get-color-from-status
common:load-views-config
hh:make-hh
hh:get
hh:set!
common:get-pkts-dirs
common:save-pkt
common:minimal-save-pkt
common:get-pkt-alists
common:get-pkt-times
common:send-thunk-to-background-thread
common:join-backgrounded-threads
dtests:get-pre-command
dtests:get-post-command
db:patt->like
tests:cache-regexp
tests:glob-like-match
tests:match
tests:match->sqlqry
tests:get-itemmaps
tests:lookup-itemmap
tests:get-tests-search-path
server:get-best-guess-address
tests:readlines
server:expiration-timeout
runs:get-mt-env-alist
keys:make-key/field-string
sexpr->string
string->sexpr
*bdat*
*user-hash-data*
*db-keys*
*pkts-info*
*configinfo*
*runconfigdat*
*configdat*
*configstatus*
*toppath*
*already-seen-runconfig-info*
*test-meta-updated*
*globalexitstatus*
*passnum*
*common:denoise*
*time-zero*
*default-area-tag*
*dbstruct-db*
*db-stats*
*db-stats-mutex*
*db-last-access*
*db-write-access*
*db-last-sync*
*db-sync-in-progress*
*db-multi-sync-mutex*
*task-db*
*db-access-allowed*
*db-access-mutex*
*db-transaction-mutex*
*db-cache-path*
*db-with-db-mutex*
*db-api-call-time*
*no-sync-db*
*my-signature*
*transport-type*
*logged-in-clients*
*server-info*
*server-run*
*run-id*
*server-kind-run*
*home-host*
*heartbeat-mutex*
*api-process-request-count*
*max-api-process-requests*
*server-overloaded*
*writes-total-delay*
*unclean-shutdown*
*rmt-mutex*
*keys*
*keyvals*
*toptest-paths*
*test-paths*
*test-ids*
*test-info*
*run-info-cache*
*launch-setup-mutex*
*homehost-mutex*
*triggers-mutex*
*numcpus-cache*
*host-loads*
*env-vars-by-run-id*
*testconfigs*
*runconfigs*
*pre-reqs-met-cache*
*verbosity-cache*
*fdb*
*last-launch*
*common:std-states*
*common:dont-roll-up-states*
*common:std-statuses*
*common:ended-states*
*common:badly-ended-states*
*common:well-ended-states*
*common:running-states*
*common:cant-run-states*
*common:not-started-ok-statuses*
*verbosity*
*logging*
*common:thread-punchlist*
*last-num-running-tests*
*seen-cant-run-tests*
*runs:denoise*
*max-tries-hash*
*send-receive-mutex*
*db:process-queue-mutex*
*http-functions*
*http-mutex*
*http-requests-in-progress*
*http-connections-next-cleanup*
*number-of-writes*
*number-non-write-queries*
*global-db-store*
*common:logpro-exit-code->status-sym-alist*
*glob-like-match-cache*
	*

;; bad name - clean this up
keys:config-get-fields
sdb:qry

;; record accessors and settors

bdat-home
bdat-user
bdat-watchdog
bdat-time-to-exit
bdat-task-db
bdat-target
bdat-this-exe-fullpath
bdat-this-exe-dir
bdat-this-exe-name
bdat-orig-env
bdat-runs-data

bdat-task-db-set!
bdat-time-to-exit-set!
bdat-watchdog-set!
bdat-task-db-set!

make-launch:einf
launch:einf-pid
launch:einf-exit-status
launch:einf-exit-code
launch:einf-rollup-status
launch:einf-pid-set!
launch:einf-exit-status-set!
launch:einf-exit-code-set!
launch:einf-rollup-status-set!

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

runs:gendat-inc-results
runs:gendat-inc-results-last-update
runs:gendat-inc-results-fmt
runs:gendat-run-info
runs:gendat-runname
runs:gendat-target
runs:gendat-inc-results-set!
runs:gendat-inc-results-last-update-set!
runs:gendat-inc-results-fmt-set!
runs:gendat-run-info-set!
runs:gendat-runname-set!
runs:gendat-target-set!

megatest-fossil-hash
)

	
(import scheme
	chicken.base
	chicken.condition
	chicken.file
	chicken.time
	chicken.file.posix

Modified dashboard-context-menu.scm from [154336438c] to [e7ae282691].

34
35
36
37
38
39
40









41

42
43
44
45
46
47
48
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

50
51
52
53
54
55
56
57







+
+
+
+
+
+
+
+
+
-
+







;; (declare (uses filedb))
(declare (uses subrunmod))
(declare (uses debugprint))
(declare (uses testsmod))
(declare (uses dcommon))

(module dashboard-context-menu
         (
dboard:launch-testpanel
dashboard:run-menu-items
dashboard:test-menu-items
dashboard:step-logs-menu-item
dashboard:toplevel-menu-items
dashboard:custom-menu-items
dashboard:context-menu
)
	*


(import format fmt)
(import (prefix iup iup:))

(import canvas-draw)

(import scheme

Modified dashboard-tests.scm from [a9fbdc4290] to [06afe8bec3].

35
36
37
38
39
40
41
























42

43
44
45
46
47
48
49
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







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+







(declare (uses configfmod))
(declare (uses testsmod))
(declare (uses mtmod))
(declare (uses dcommon))
(declare (uses launchmod))

(module dashboard-tests
	  (
message-window
test-info-panel
test-meta-panel-get-description
test-meta-panel
run-info-panel
host-info-panel
submegatest-panel
update-state-status-buttons
set-fields-panel
dashboard-tests:run-a-step
dashboard-tests:waiver
dashboard-tests:examine-test
colors-similar?
dashboard:draw-tests
dboard:tabdat-test-patts-use
dashboard:update-run-command
iuplistbox-fill-list
*tim*
*dashboard-comment-share-slot*
*state-status*
*dashboard-test-db*
*dashboard-comment-share-slot*
)
	*


(import scheme
	chicken.file.posix
	chicken.base
	chicken.string
	chicken.condition
	chicken.file

Modified dashboard.scm from [788b5f894c] to [65185c4638].

16
17
18
19
20
21
22

23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

33
34
35
36
37
38
39







+









-







;;     You should have received a copy of the GNU General Public License
;;     along with Megatest.  If not, see <http://www.gnu.org/licenses/>.
;;
;;======================================================================

(declare (uses ducttape-lib))

(declare (uses debugprint))
(declare (uses bigmod))
;; (declare (uses gutils))
(declare (uses bigmod.import))
(declare (uses commonmod))
(declare (uses configfmod))
(declare (uses dashboard-context-menu))
(declare (uses dashboard-tests))
(declare (uses dbmod))
(declare (uses dcommon))
(declare (uses debugprint))
(declare (uses debugprint.import))
(declare (uses itemsmod))
(declare (uses launchmod))
(declare (uses mtargs))
(declare (uses mtmod))
(declare (uses mtver))
(declare (uses processmod))
71
72
73
74
75
76
77

78

79
80
81
82
83
84
85
86
87
88
89
71
72
73
74
75
76
77
78

79
80
81
82

83
84
85
86
87
88
89







+
-
+



-







;; (include "db_records.scm")
;; (include "run_records.scm")
;; (include "task_records.scm")
;; (include "megatest-version.scm")
(include "megatest-fossil-hash.scm")
;; (include "vg_records.scm")

(import	debugprint
(import commonmod
	commonmod
	;; gutils
	configfmod
	dbmod
	debugprint
	itemsmod
	launchmod
	(prefix mtargs args:)
	mtmod
	mtver
	processmod
	runsmod

Modified dbmod.scm from [9b3f9a0905] to [ab3d898579].

28
29
30
31
32
33
34





































































































































































































35
36














































37
38
39
40
41
42
43
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
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







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+







(declare (uses csv-xml))
(declare (uses keysmod))
(declare (uses mtmod))
(declare (uses pkts))
(declare (uses dbi))

(module dbmod
	   (
dbr:dbstruct-get-dbdat
dbr:dbstruct-dbdat-put!
db:run-id->first-num
db:run-id->path
db:dbname->path
db:run-id->dbname
db:get-dbdat
db:get-inmem
db:get-ddb
db:open-dbdat
db:open-run-db
db:open-inmem-db
db:setup
db:get-main-lock
db:with-lock-db
db:get-iam-server-lock
db:get-locker
db:take-lock
db:release-lock
db:general-sqlite-error-dump
db:first-result-default
db:generic-error-printout
db:with-db
db:set-sync
db:get-last-update-time
db:sync-inmem->disk
db:sync-main-list
db:sync-all-tables-list
db:move-and-recreate-db
db:repair-db
db:sync-one-table
db:sync-tables
db:patch-schema-rundb
db:patch-schema-maindb
db:adj-target
db:get-access-mode
db:dispatch-query
db:create-all-triggers
db:create-triggers
db:drop-all-triggers
db:is-trigger-dropped
db:drop-triggers
db:initialize-db
db:archive-get-allocations
db:archive-register-disk
db:archive-register-block-name
db:test-set-archive-block-id
db:test-get-archive-block-info
open-logging-db
db:log-local-event
db:log-event
db:have-incompletes?
db:get-status-from-final-status-file
db:find-and-mark-incomplete
db:top-test-set-per-pf-counts
db:clean-up
db:clean-up-rundb
db:get-var
db:inc-var
db:dec-var
db:set-var
db:add-var
db:del-var
db:open-no-sync-db
db:no-sync-db
db:no-sync-set
db:no-sync-del!
db:no-sync-get/default
db:no-sync-get-lock
db:get-keys
db:get-index-by-header
db:get-value-by-header
db:get-header
db:get-rows
db:get-run-times
db:get-run-name-from-id
db:get-run-key-val
runs:get-std-run-fields
db:register-run
db:insert-run
db:get-runs
db:simple-get-runs
db:get-changed-run-ids
db:get-targets
db:get-num-runs
db:get-runs-cnt-by-patt
db:get-raw-run-stats
db:update-run-stats
db:get-main-run-stats
db:print-current-query-stats
db:get-all-run-ids
db:get-run-stats
db:get-runs-by-patt
db:get-run-info
db:set-comment-for-run
db:delete-run
db:update-run-event_time
db:lock/unlock-run
db:set-run-status
db:set-run-state-status
db:get-run-status
db:get-run-state
db:get-key-val-pairs
db:get-key-vals
db:get-target
db:get-prev-run-ids
db:get-tests-for-run
db:test-short-record->norm
db:get-tests-for-run-state-status
db:get-testinfo-state-status
db:get-tests-for-run-mindata
db:get-tests-for-runs
db:delete-test-records
db:delete-old-deleted-test-records
db:set-tests-state-status
db:test-set-state-status
db:get-count-tests-running
db:get-count-tests-actually-running
db:get-count-tests-running-for-run-id
db:get-count-tests-running-for-testname
db:get-not-completed-cnt
db:get-count-tests-running-in-jobgroup
db:estimated-tests-remaining
db:get-test-id
db:test-set-top-process-pid
db:test-get-top-process-pid
db:field->number
db:update-tesdata-on-repilcate-db
db:get-all-tests-info-by-run-id
db:replace-test-records
db:get-test-info-by-id
db:get-test-info-by-ids
db:get-test-info
db:test-get-rundir-from-test-id
db:get-test-times
db:teststep-set-status!
db:delete-steps-for-test!
db:get-steps-for-test
db:get-steps-data
db:get-data-info-by-id
db:test-data-rollup
db:logpro-dat->csv
db:csv->test-data
db:read-test-data
db:read-test-data-varpatt
db:get-run-ids-matching-target
db:test-get-paths-matching-keynames-target-new
db:test-toplevel-num-items
db:obj->string
db:string->obj
db:set-state-status-and-roll-up-items
db:roll-up-rules
db:set-state-status-and-roll-up-run
db:get-all-state-status-counts-for-run
db:get-all-state-status-counts-for-test
db:test-get-logfile-info
db:lookup-query
db:login
db:general-call
db:get-state-status-summary
db:get-latest-host-load
db:set-top-level-from-items
db:get-matching-previous-test-run-records
db:test-get-records-for-index-file
db:get-tests-tags
db:testmeta-get-record
db:testmeta-add-record
db:testmeta-update-field
db:testmeta-get-all
db:compare-itempaths
db:convert-test-itempath
db:multi-pattern-apply
db:get-prereqs-not-met
db:get-run-record-ids
db:get-changed-record-ids
tdb:read-test-data
tdb:get-prev-tol-for-test
tdb:step-get-time-as-string
tdb:get-steps-table
tdb:get-steps-table-list
tdb:get-compressed-steps
mt:run-trigger
mt:process-triggers
mt:lazy-read-test-config
mt:get-run-stats
server:reply
common:with-queue-db
common:load-pkts-to-db
db:hoh-set!
db:hoh-get
db:get-cache-stmth
db:register-server
db:deregister-server
db:get-server-info
db:get-count-servers
db:get-steps-info-by-id
	*
	

make-dbr:dbdat
dbr:dbdat-db
dbr:dbdat-inmem
dbr:dbdat-last-sync
dbr:dbdat-last-write
dbr:dbdat-run-id
dbr:dbdat-fname
dbr:dbdat-db-set!
dbr:dbdat-inmem-set!
dbr:dbdat-last-sync-set!
dbr:dbdat-last-write-set!
dbr:dbdat-run-id-set!
dbr:dbdat-fname-set!

make-dbr:dbstruct
dbr:dbstruct-mtdb
dbr:dbstruct-dbdats
dbr:dbstruct-read-only
dbr:dbstruct-stmt-cache
dbr:dbstruct-mtdb-set!
dbr:dbstruct-dbdats-set!
dbr:dbstruct-read-only-set!
dbr:dbstruct-stmt-cache-set!

make-simple-run
simple-run-target
simple-run-id
simple-run-runname
simple-run-state
simple-run-status
simple-run-owner
simple-run-event_time
simple-run-target-set!
simple-run-id-set!
simple-run-runname-set!
simple-run-state-set!
simple-run-status-set!
simple-run-owner-set!
simple-run-event_time-set!

;; fix naming on these ones
db:test-record-fields
db:test-record-qry-selector
)

(import scheme
	(prefix sqlite3 sqlite3:)
	chicken.base
	chicken.condition
	chicken.eval
	chicken.file
	chicken.file.posix
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554














3555
3556
3557
3558
3559
3560
3561
3775
3776
3777
3778
3779
3780
3781














3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802







-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+







	(lambda (id test-id stepname state status event-time logfile comment)
	  (set! res (cons (vector id test-id stepname state status event-time (if (string? logfile) logfile "") comment) res)))
	db
	"SELECT id,test_id,stepname,state,status,event_time,logfile,comment FROM test_steps WHERE status != 'DELETED' AND test_id=? ORDER BY id ASC;" ;; event_time DESC,id ASC;
	test-id)
       (reverse res)))))

 (define (db:get-steps-info-by-id dbstruct  test-step-id)
   (db:with-db
    dbstruct
    #f 
    #f
    (lambda (db)
      (let* ((res (vector #f #f #f #f #f #f #f #f #f)))
        (sqlite3:for-each-row 
       (lambda (id test-id stepname state status event-time logfile comment last-update)
         (set! res (vector id test-id stepname state status event-time (if (string? logfile) logfile "") comment last-update)))
       db
       "SELECT id,test_id,stepname,state,status,event_time,logfile,comment,last_update FROM test_steps WHERE id=? ORDER BY id ASC;" ;; event_time DESC,id ASC;
       test-step-id)
        res))))
(define (db:get-steps-info-by-id dbstruct  test-step-id)
  (db:with-db
   dbstruct
   #f 
   #f
   (lambda (db)
     (let* ((res (vector #f #f #f #f #f #f #f #f #f)))
       (sqlite3:for-each-row 
	(lambda (id test-id stepname state status event-time logfile comment last-update)
	  (set! res (vector id test-id stepname state status event-time (if (string? logfile) logfile "") comment last-update)))
	db
	"SELECT id,test_id,stepname,state,status,event_time,logfile,comment,last_update FROM test_steps WHERE id=? ORDER BY id ASC;" ;; event_time DESC,id ASC;
	test-step-id)
       res))))

(define (db:get-steps-data dbstruct run-id test-id)
  (db:with-db
   dbstruct
   run-id
   #f
   (lambda (db)

Added scripts/gen-module-list.sh version [4eb90dd26d].









1
2
3
4
5
6
7
8
+
+
+
+
+
+
+
+
#!/bin/bash

TARGFILE=$1

echo '   ('
egrep '^\(define \(' $TARGFILE | tr '()' '  '|awk '{print $2}'
egrep '^\(define \*' $TARGFILE | awk '{print $2}'
echo ')'