Overview
Comment: | Added MT_TARGET to testconfig environment. Added first four chars of fossil node hash to version in server registry. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | dev |
Files: | files | file ages | folders |
SHA1: |
d604df857ca4b2c8c8979660fcec03bd |
User & Date: | mrwellan on 2013-07-10 18:15:33 |
Other Links: | branch diff | manifest | tags |
Context
2013-07-10
| ||
20:39 | Server control panel done check-in: e0d44ae25e user: mrwellan tags: dev | |
18:15 | Added MT_TARGET to testconfig environment. Added first four chars of fossil node hash to version in server registry. check-in: d604df857c user: mrwellan tags: dev | |
17:16 | Primitive server controls added. Fixed max and sort for view in Runs Summary mode check-in: d280b3b369 user: mrwellan tags: dev | |
Changes
Modified common.scm from [8a39966f54] to [f838b5ff62].
︙ | |||
97 98 99 100 101 102 103 104 105 106 107 108 109 110 | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | + + + | (let ((res (assoc key lst))) (if res (cadr res)(if (null? default) #f (car default))))) ;;====================================================================== ;; Misc utils ;;====================================================================== (define (common:version-signature) (conc megatest-version "-" (substring megatest-fossil-hash 0 4))) ;; one-of args defined (define (args-defined? . param) (let ((res #f)) (for-each (lambda (arg) (if (args:get-arg arg)(set! res #t))) param) |
︙ |
Modified megatest.scm from [46665468a0] to [8483909d81].
︙ | |||
342 343 344 345 346 347 348 | 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 | - + - - + + - + - + | ))))) (if (or (args:get-arg "-list-servers") (args:get-arg "-stop-server")) (let ((tl (setup-for-run))) (if tl (let* ((servers (open-run-close tasks:get-all-servers tasks:open-db)) |
︙ |
Modified runs.scm from [381e7aa17b] to [2ded045715].
︙ | |||
113 114 115 116 117 118 119 120 121 122 123 124 125 126 | 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | + | keyvals))) ;; from the cached data set the vars (hash-table-for-each vals (lambda (key val) (debug:print 2 "setenv " key " " val) (setenv key val))) (if (not (get-environment-variable "MT_TARGET"))(setenv "MT_TARGET" target)) (alist->env-vars (hash-table-ref/default *configdat* "env-override" '())) ;; Lets use this as an opportunity to put MT_RUNNAME in the environment (setenv "MT_RUNNAME" (if inrunname inrunname (cdb:remote-run db:get-run-name-from-id #f run-id))) (setenv "MT_RUN_AREA_HOME" *toppath*))) (define (set-item-env-vars itemdat) (for-each (lambda (item) |
︙ | |||
179 180 181 182 183 184 185 | 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | - - | (keyvals (keys:target->keyval keys target)) (run-id (cdb:remote-run db:register-run #f keyvals runname "new" "n/a" user)) ;; test-name))) (deferred '()) ;; delay running these since they have a waiton clause (runconfigf (conc *toppath* "/runconfigs.config")) (required-tests '()) (test-records (make-hash-table)) (all-test-names (tests:get-valid-tests *toppath* "%"))) ;; we need a list of all valid tests to check waiton names |
︙ | |||
210 211 212 213 214 215 216 217 218 219 220 221 222 223 | 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | + | ;; now add non-directly referenced dependencies (i.e. waiton) ;;====================================================================== ;; refactoring this block into tests:get-full-data ;;====================================================================== (if (not (null? test-names)) (let loop ((hed (car test-names)) (tal (cdr test-names))) ;; 'return-procs tells the config reader to prep running system but return a proc (change-directory *toppath*) ;; PLEASE OPTIMIZE ME!!! I think this should be a no-op but there are several places where change-directories could be happening. (let* ((config (tests:get-testconfig hed 'return-procs)) (waitons (let ((instr (if config (config-lookup config "requirements" "waiton") (begin ;; No config means this is a non-existant test (debug:print 0 "ERROR: non-existent required test \"" hed "\"") (exit 1))))) (debug:print-info 8 "waitons string is " instr) |
︙ |
Modified tasks.scm from [518ec04147] to [d74494eba8].
︙ | |||
95 96 97 98 99 100 101 | 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | - + + + + | ;; state: 'live, 'shutting-down, 'dead (define (tasks:server-register mdb pid interface port priority state transport #!key (pubport -1)) (debug:print-info 11 "tasks:server-register " pid " " interface " " port " " priority " " state) (sqlite3:execute mdb "INSERT OR REPLACE INTO servers (pid,hostname,port,pubport,start_time,priority,state,mt_version,heartbeat,interface,transport) VALUES(?, ?, ?, ?, strftime('%s','now'), ?, ?, ?, strftime('%s','now'),?,?);" |
︙ | |||
204 205 206 207 208 209 210 | 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | - + | (set! res (cons (vector id interface port pubport transport pid hostname) res)) ;;(debug:print-info 2 "Found existing server " hostname ":" port " registered in db")) ) mdb "SELECT id,interface,port,pubport,transport,pid,hostname FROM servers WHERE strftime('%s','now')-heartbeat < 10 |
︙ |
Modified tests/fdktestqa/testqa/tests/bigrun/testconfig from [a953628936] to [b610e9c1ff].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | + | # Add additional steps here. Format is "stepname script" [ezsteps] step1 step1.sh # Test requirements are specified here [requirements] # waiton setup priority 0 # Iteration for your tests are controlled by the items section [items] NUMBER #{scheme (string-intersperse (map number->string (sort (let loop ((a 0)(res '()))(if (<= a (or (any->number (get-environment-variable "NUMTESTS")) 2500))(loop (+ a 1)(cons a res)) res)) <)) " ")} # NUMBER #{shell xterm} # test_meta is a section for storing additional data on your test [test_meta] author matt owner matt description An example test tags tagone,tagtwo |
︙ |