Overview
Context
Changes
Modified megatest-version.scm
from [24f92fbbe5]
to [e6e6aaf777].
1
2
3
4
5
6
7
|
1
2
3
4
5
6
7
|
-
+
|
;; Always use two digit decimal
;; 1.01, 1.02...1.10,1.11 ... 1.99,2.00..
(declare (unit megatest-version))
(define megatest-version 1.5211)
(define megatest-version 1.5212)
|
Modified mockup-cached-writes.scm
from [693b1bc0fd]
to [2795191c23].
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
-
+
+
-
+
+
+
+
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
|
(define (make-cached-writer the-db)
(let ((db the-db)
(queue '()))
(lambda (cacheable . qry-params)
(lambda (cacheable . qry-params) ;; fn qry
(if cacheable
(begin
(set! queue (cons qry-params queue))
(set! queue (cons qry-params queue))
(call/cc))
(begin
(print "Starting transaction")
(for-each
(lambda (queue-item)
(let ((fn (car queue-item))
(qry (cdr queue-item)))
(print "WRITE to " db ": " queue-item))
(print "WRITE to " db ": " qry)
)
(reverse queue))
(print "End transaction")
(print "READ from " db ": " qry-params))))))
(define a (make-cached-writer "the db"))
(a #t "insert abc")
(a #t "insert def")
(a #t "insert hij")
(a #f "select foo")
(define *cw* (make-cached-writer "the db"))
(define (dbcall cacheable query)
(*cw* cacheable query))
(dbcall #t "insert abc")
(dbcall #t "insert def")
(dbcall #t "insert hij")
(dbcall #f "select foo")
|
Modified runs.scm
from [1837f1ac5c]
to [1aa6b158e4].
︙ | | |
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
|
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
|
-
+
-
+
|
(debug:print 2 "setenv " (car item) " " (cadr item))
(setenv (car item) (cadr item)))
itemdat))
(define *last-num-running-tests* 0)
(define *runs:can-run-more-tests-delay* 0)
(define (runs:shrink-can-run-more-tests-delay)
(set! *runs:can-run-more-tests-delay* (/ *runs:can-run-more-tests-delay* 2)))
(set! *runs:can-run-more-tests-delay* 0)) ;; (/ *runs:can-run-more-tests-delay* 2)))
(define (runs:can-run-more-tests test-record)
(thread-sleep! *runs:can-run-more-tests-delay*)
(let* ((tconfig (tests:testqueue-get-testconfig test-record))
(jobgroup (config-lookup tconfig "requirements" "jobgroup"))
;; Heuristic fix. These are getting called too rapidly when jobs are running or stuck
;; so we are going to increment a global delay by 0.1 seconds up to 10 seconds
;; every time runs:can-run-more-tests is called.
;; when a test is launched or other activity occurs divide the delay by 2
(num-running (cdb:remote-run db:get-count-tests-running #f))
(num-running-in-jobgroup (cdb:remote-run db:get-count-tests-running-in-jobgroup #f jobgroup))
(max-concurrent-jobs (let ((mcj (config-lookup *configdat* "setup" "max_concurrent_jobs")))
(if (and mcj (string->number mcj))
(string->number mcj)
1)))
(job-group-limit (config-lookup *configdat* "jobgroups" jobgroup)))
(if (and (> (+ num-running num-running-in-jobgroup) 0)
(< *runs:can-run-more-tests-delay* 10))
(begin
(set! *runs:can-run-more-tests-delay* (+ *runs:can-run-more-tests-delay* 0.1))
(set! *runs:can-run-more-tests-delay* (+ *runs:can-run-more-tests-delay* 1)) ;; 0.1))
(debug:print-info 14 "can-run-more-tests-delay: " *runs:can-run-more-tests-delay*)))
(if (not (eq? *last-num-running-tests* num-running))
(begin
(debug:print 2 "max-concurrent-jobs: " max-concurrent-jobs ", num-running: " num-running)
(set! *last-num-running-tests* num-running)))
(if (not (eq? 0 *globalexitstatus*))
(list #f num-running num-running-in-jobgroup max-concurrent-jobs job-group-limit)
|
︙ | | |