Overview
Comment: | Merged from archiving branch, added caching for steps |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
65ae97a3b1d2180258941db274c2b4fe |
User & Date: | matt on 2012-02-26 14:00:14 |
Other Links: | manifest | tags |
Context
2012-02-26
| ||
16:09 | Stand-alone runs now working check-in: a3bcf88b79 user: matt tags: trunk | |
14:00 | Merged from archiving branch, added caching for steps check-in: 65ae97a3b1 user: matt tags: trunk | |
07:47 | Broke connection to server out of open-db check-in: 35d5a09470 user: matt tags: trunk | |
2012-02-24
| ||
14:58 | Accidental check in of rpc related junk Closed-Leaf check-in: 7502542dd9 user: mrwellan tags: archiving | |
Changes
Modified dashboard-tests.scm from [3477ef2c51] to [c62871416c].
︙ | |||
245 246 247 248 249 250 251 | 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 | - + | btns)))))) ;;====================================================================== ;; ;;====================================================================== (define (examine-test db test-id) ;; run-id run-key origtest) |
︙ |
Modified dashboard.scm from [4b685b7cb0] to [bb3dee1654].
︙ | |||
74 75 76 77 78 79 80 | 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 | - + + + | (if (not (setup-for-run)) (begin (print "Failed to find megatest.config, exiting") (exit 1))) (define *db* (open-db)) |
︙ |
Modified db.scm from [18429e2674] to [1cbcbbe994].
︙ | |||
25 26 27 28 29 30 31 32 33 34 35 36 37 38 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | + + + + + + | (declare (uses ods)) (include "common_records.scm") (include "db_records.scm") (include "key_records.scm") (include "run_records.scm") ;; timestamp type (val1 val2 ...) ;; type: meta-info, step (define *incoming-data* '()) (define *incoming-last-time* (current-seconds)) (define *incoming-mutex* (make-mutex)) (define (open-db) ;; (conc *toppath* "/megatest.db") (car *configinfo*))) (let* ((dbpath (conc *toppath* "/megatest.db")) ;; fname) (dbexists (file-exists? dbpath)) (db (sqlite3:open-database dbpath)) ;; (never-give-up-open-db dbpath)) (handler (make-busy-timeout 36000))) (sqlite3:set-busy-handler! db handler) (if (not dbexists) |
︙ | |||
612 613 614 615 616 617 618 619 620 621 622 | 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 | + + + + + + + + + + - - + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + | (sqlite3:for-each-row (lambda (p) (set! res (cons p res))) db qrystr) res)) ;;====================================================================== ;; QUEUE UP META, TEST STATUS AND STEPS ;;====================================================================== (define (db:updater db) (let loop ((start-time (current-time))) (thread-sleep! (+ 2 (random 10))) ;; move save time around to minimize regular collisions (db:write-cached-data db) (loop start-time))) (define (db:test-update-meta-info db run-id test-name item-path minutes cpuload diskfree tmpfree) (if (not item-path) (begin (debug:print 0 "WARNING: ITEMPATH not set.") (set! item-path ""))) |
︙ | |||
929 930 931 932 933 934 935 | 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 | + + + - + - - - + - + + | (debug:print 5 "testdat: " testdat) (if (and testdat ;; if the section exists then force specification BUG, I don't like how this works. (or (not state)(not status))) (debug:print 0 "WARNING: Invalid " (if status "status" "state") " value \"" (if status state-in status-in) "\", update your validvalues section in megatest.config")) (if testdat (let ((test-id (test:get-id testdat))) (mutex-lock! *incoming-mutex*) (set! *incoming-data* (cons (vector 'step-status (current-seconds) |
︙ | |||
1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 | 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 | + + + + + + + + | (if *runremote* (let ((host (vector-ref *runremote* 0)) (port (vector-ref *runremote* 1))) ((rpc:procedure 'rdb:get-tests-for-run host port) run-id testpatt itempatt states statuses)) (db:get-tests-for-run db run-id testpatt itempatt states statuses))) (define (rdb:get-test-data-by-id db test-id) (if *runremote* (let ((host (vector-ref *runremote* 0)) (port (vector-ref *runremote* 1))) ((rpc:procedure 'rpc:get-test-data-by-id host port) test-id)) (db:get-test-data-by-id db test-id))) (define (rdb:get-keys db) (if *runremote* (let ((host (vector-ref *runremote* 0)) (port (vector-ref *runremote* 1))) ((rpc:procedure 'rdb:get-keys host port))) (db:get-keys db))) |
︙ |
Modified runs.scm from [27defb6fc2] to [f4fc1b00d9].
︙ | |||
399 400 401 402 403 404 405 | 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 | + - + | ;; (lambda (itemdat) ;;; ((ripeness "overripe") (temperature "cool") (season "summer")) (let* ((new-test-path (string-intersperse (cons test-path (map cadr itemdat)) "/")) (new-test-name (if (equal? item-path "") test-name (conc test-name "/" item-path))) ;; just need it to be unique (testdat (rdb:get-test-info db run-id test-name item-path))) (if (not testdat) (begin ;; ensure that the path exists before registering the test ;; NOPE: Cannot! Don't know yet which disk area will be assigned.... |
︙ |
Modified server.scm from [83f96f7c65] to [c469d03fe2].
︙ | |||
36 37 38 39 40 41 42 43 44 45 46 47 48 49 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | + | (define (server:start db hostn) (debug:print 0 "Attempting to start the server ...") (let* ((rpc:listener (server:find-free-port-and-open (rpc:default-server-port))) (th1 (make-thread (cute (rpc:make-server rpc:listener) "rpc:server") 'rpc:server)) (th2 (make-thread (lambda ()(db:updater db)))) (hostname (if (string=? "-" hostn) (get-host-name) hostn)) (ipaddrstr (if (string=? "-" hostn) (string-intersperse (map number->string (u8vector->list (hostname->ip hostname))) ".") #f)) (host:port (conc (if ipaddrstr ipaddrstr hostname) ":" (rpc:default-server-port)))) |
︙ | |||
94 95 96 97 98 99 100 101 102 103 104 105 106 107 | 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | + + + + + | (lambda (run-id test-name item-path comment) (db:test-set-comment db run-id test-name item-path comment))) (rpc:publish-procedure! 'rdb:test-set-log! (lambda (run-id test-name item-path logf) (db:test-set-log! db run-id test-name item-path logf))) (rpc:publish-procedure! 'rpc:get-test-data-by-id (lambda (test-id) (db:get-test-data-by-id db test-id))) (rpc:publish-procedure! 'serve:get-toppath (lambda () *toppath*)) (rpc:publish-procedure! |
︙ | |||
194 195 196 197 198 199 200 | 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | + - + | (tests:register-test db run-id test-name item-path))) (set! *rpc:listener* rpc:listener) (on-exit (lambda () (sqlite3:execute db "DELETE FROM metadat WHERE var='SERVER' and val=?;" host:port) (sqlite3:finalize! db))) (thread-start! th1) (thread-start! th2) |
︙ |
Modified tests/Makefile from [49d98dd9eb] to [393100f5ee].
1 2 3 4 5 6 7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | - + + - + | # run some tests BINPATH=$(shell realpath ../bin) MEGATEST=$(BINPATH)/megatest PATH := $(BINPATH):$(PATH) runall : |
︙ |
Modified tests/megatest.config from [15ea3d69a8] to [ca2c047d9a].
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | - + | [fields] sysname TEXT fsname TEXT datapath TEXT [setup] # exectutable /path/to/megatest max_concurrent_jobs 50 |
︙ | |||
37 38 39 40 41 42 43 | 37 38 39 40 41 42 43 44 | - + | # RUNDEAD [system exit 56] ## disks are: ## name host:/path/to/area ## -or- ## name /path/to/area [disks] |