Overview
Comment: | Monitor based runs working well |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
a1371db27aa42d132a7a06bd46089de7 |
User & Date: | matt on 2011-10-23 23:03:46 |
Other Links: | manifest | tags |
Context
2011-10-24
| ||
03:36 | Added missing dashboard-guimonitor.scm file check-in: 7ee9f12f63 user: matt tags: trunk | |
2011-10-23
| ||
23:03 | Monitor based runs working well check-in: a1371db27a user: matt tags: trunk | |
20:42 | Lots of little bugs fixed related to monitor. Note that now multiple runs must be accomodated from the same launcher check-in: 98de2c2f8d user: matt tags: trunk | |
Changes
Modified Makefile from [d16e947139] to [56afbe1a91].
︙ | |||
18 19 20 21 22 23 24 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | - + | megatest: $(OFILES) megatest.o csc $(OFILES) megatest.o -o megatest dboard : $(OFILES) $(GOFILES) csc $(OFILES) $(GOFILES) -o dboard # Special dependencies for the includes |
︙ |
Modified db.scm from [a288398d2a] to [f088a0a421].
︙ | |||
280 281 282 283 284 285 286 | 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 | - + | "SELECT fieldname,fieldtype FROM keys ORDER BY id DESC;") (set! *db-keys* res) res))) (define db:get-keys db-get-keys) (define (db:get-value-by-header row header field) |
︙ | |||
363 364 365 366 367 368 369 | 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 | - + | (let* ((res #f) (keys (db-get-keys db)) (remfields (list "id" "runname" "state" "status" "owner" "event_time")) (header (append (map key:get-fieldname keys) remfields)) (keystr (conc (keys->keystr keys) "," (string-intersperse remfields ",")))) |
︙ |
Modified runs.scm from [9af3e39a19] to [cff48b30cc].
︙ | |||
218 219 220 221 222 223 224 | 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 | - - - - - - - - + + + + + + + + | ;; if status is "AUTO" then call rollup (if (and test-id state status (equal? status "AUTO")) (db:test-data-rollup db test-id)) ;; add metadata (need to do this way to avoid SQL injection issues) ;; :first_err |
︙ | |||
636 637 638 639 640 641 642 | 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 | - + | (num-running (db:get-count-tests-running db)) (max-concurrent-jobs (config-lookup *configdat* "setup" "max_concurrent_jobs")) (parent-test (and (not (null? items))(equal? item-path ""))) (single-test (and (null? items) (equal? item-path ""))) (item-test (not (equal? item-path ""))) (item-patt (args:get-arg "-itempatt")) (patt-match (if item-patt |
︙ | |||
942 943 944 945 946 947 948 | 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 | - - - + + + - - + + + | (single-test (and (null? items) (equal? item-path ""))) (item-test (not (equal? item-path ""))) ;; look through all the item-patts if defined, format is patt1,patt2,patt3 ... wildcard is % (item-matches (if item-patts (let ((res #f)) (for-each (lambda (patt) |
︙ | |||
1244 1245 1246 1247 1248 1249 1250 | 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 | - - + + | (full-name (conc testname "/" item-path)) (prev-test-dat (hash-table-ref/default curr-tests-hash full-name #f)) (test-steps (db:get-steps-for-test db (db:test-get-id testdat))) (new-test-record #f)) ;; replace these with insert ... select (apply sqlite3:execute db |
︙ |
Modified tasks.scm from [cdc34b2110] to [d5fdccfca8].
︙ | |||
88 89 90 91 92 93 94 | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | - + - + - + | db (lambda () ;; execution time is updated with every snag, wait 10 secs before doing anything with the queue (sqlite3:for-each-row (lambda (id . rem) (set! res (apply vector id rem))) db |
︙ | |||
152 153 154 155 156 157 158 159 160 161 162 163 164 165 | 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | + | (tasks:monitors-update db) (loop (+ count 1)(+ (current-seconds) 240))) (loop (+ count 1) next-touch))))))) (define (tasks:process-queue db megatestdbpath) (let* ((task (tasks:snag-a-task db)) (action (if task (tasks:task-get-action task) #f))) (print "tasks:process-queue task: " task) (if action (case (string->symbol action) ((run) (tasks:start-run db task)) ((remove) (tasks:remove-runs db task)) ((lock) (tasks:lock-runs db task)) ;; ((monitor) (tasks:start-monitor db task)) ((rollup) (tasks:rollup-runs db task)) |
︙ | |||
230 231 232 233 234 235 236 | 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | - - - - - - - - - - - - + + + + + + + + + + + + - | (define (tasks:set-state db task-id state) (sqlite3:execute db "UPDATE tasks_queue SET state=? WHERE id=?;" state task-id)) (define (tasks:start-run db task) |
Modified tests/Makefile from [65f4045670] to [0ebf03c262].
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - + - + - + | test : csi -b -I .. ../megatest.scm -- -runall :sysname ubuntu :fsname afs :datapath tmp :runname blah cd ../;make test make runall dashboard : cd ../;make dboard |
Modified tests/megatest.config from [afd6a74f3f] to [a543ba73e0].
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | - + - + | runsdir /tmp/runs [jobtools] # useshell yes # ## launcher launches jobs, the job is managed on the target host ## by megatest, comment out launcher to run local # workhosts localhost hermes |
︙ |