Overview
Comment: | Fixed couple issues with testconfig caching and fixed sorting on dashboard for -event_time case |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.60 |
Files: | files | file ages | folders |
SHA1: |
00fe09dc6c772a50c5d88284b065af05 |
User & Date: | matt on 2015-10-06 00:24:17 |
Other Links: | branch diff | manifest | tags |
Context
2015-10-06
| ||
23:59 | Added some primitive arrows to dashboard tests display, played with different options on sort by waiton/priority but it seems to not be respected ... check-in: 01ebfc1ba9 user: matt tags: v1.60 | |
00:24 | Fixed couple issues with testconfig caching and fixed sorting on dashboard for -event_time case check-in: 00fe09dc6c user: matt tags: v1.60 | |
2015-10-05
| ||
22:07 | Better handling of cached testconfigs (I think) check-in: 213395bcb3 user: mrwellan tags: v1.60 | |
Changes
Modified dashboard.scm from [9cc34c8a65] to [cf1ba76b54].
︙ | ︙ | |||
212 213 214 215 216 217 218 219 220 221 222 223 224 225 | (define (colors-similar? color1 color2) (let* ((c1 (map string->number (string-split color1))) (c2 (map string->number (string-split color2))) (delta (map (lambda (a b)(abs (- a b))) c1 c2))) (null? (filter (lambda (x)(> x 3)) delta)))) ;; keypatts: ( (KEY1 "abc%def")(KEY2 "%") ) (define (update-rundat runnamepatt numruns testnamepatt keypatts) (let* ((referenced-run-ids '()) (allruns (if *useserver* (rmt:get-runs runnamepatt numruns *start-run-offset* keypatts) (db:get-runs *dbstruct-local* runnamepatt numruns ;; (+ numruns 1) ;; (/ numruns 2)) *start-run-offset* keypatts))) | > > > > > > > > > > > > > > > > > > > > | 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 | (define (colors-similar? color1 color2) (let* ((c1 (map string->number (string-split color1))) (c2 (map string->number (string-split color2))) (delta (map (lambda (a b)(abs (- a b))) c1 c2))) (null? (filter (lambda (x)(> x 3)) delta)))) (define (compare-tests test1 test2) (let* ((test-name1 (db:test-get-testname test1)) (item-path1 (db:test-get-item-path test1)) (eventtime1 (db:test-get-event_time test1)) (test-name2 (db:test-get-testname test2)) (item-path2 (db:test-get-item-path test2)) (eventtime2 (db:test-get-event_time test2)) (same-name (equal? test-name1 test-name2)) (test1-top (equal? item-path1 "")) (test2-top (equal? item-path2 "")) (test1-older (> eventtime1 eventtime2)) (same-time (equal? eventtime1 eventtime2))) (if same-name (if same-time (string>? item-path1 item-path2) test1-older) (if same-time (string>? test-name1 test-name2) test1-older)))) ;; keypatts: ( (KEY1 "abc%def")(KEY2 "%") ) (define (update-rundat runnamepatt numruns testnamepatt keypatts) (let* ((referenced-run-ids '()) (allruns (if *useserver* (rmt:get-runs runnamepatt numruns *start-run-offset* keypatts) (db:get-runs *dbstruct-local* runnamepatt numruns ;; (+ numruns 1) ;; (/ numruns 2)) *start-run-offset* keypatts))) |
︙ | ︙ | |||
236 237 238 239 240 241 242 | 'testname 'itempath))) ;; ;; trim runs to only those that are changing often here ;; (for-each (lambda (run) (let* ((run-id (db:get-value-by-header run header "id")) | | > > > | 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 | 'testname 'itempath))) ;; ;; trim runs to only those that are changing often here ;; (for-each (lambda (run) (let* ((run-id (db:get-value-by-header run header "id")) (tmptests (if *useserver* (rmt:get-tests-for-run run-id testnamepatt states statuses #f #f *hide-not-hide* sort-by sort-order 'shortlist) (db:get-tests-for-run *dbstruct-local* run-id testnamepatt states statuses #f #f *hide-not-hide* sort-by sort-order 'shortlist))) (tests (if (eq? *tests-sort-reverse* 3) ;; +event_time (sort tmptests compare-tests) tmptests)) ;; NOTE: bubble-up also sets the global *all-item-test-names* ;; (tests (bubble-up tmptests priority: bubble-type)) (key-vals (if *useserver* (rmt:get-key-vals run-id) (db:get-key-vals *dbstruct-local* run-id)))) ;; NOTE: 11/01/2013 This routine is *NOT* getting called excessively. ;; (debug:print 0 "Getting data for run " run-id " with key-vals=" key-vals) |
︙ | ︙ |
Modified launch.scm from [37fee9ec8f] to [2fb2c2b871].
︙ | ︙ | |||
170 171 172 173 174 175 176 | (tests:test-set-status! run-id test-id "COMPLETED" "FAIL" (conc "Failed at step " stepname) #f) ))) logpro-used)) (define (launch:execute encoded-cmd) (let* ((cmdinfo (common:read-encoded-string encoded-cmd)) | | | 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | (tests:test-set-status! run-id test-id "COMPLETED" "FAIL" (conc "Failed at step " stepname) #f) ))) logpro-used)) (define (launch:execute encoded-cmd) (let* ((cmdinfo (common:read-encoded-string encoded-cmd)) (tconfigreg (tests:get-all))) (setenv "MT_CMDINFO" encoded-cmd) (if (list? cmdinfo) ;; ((testpath /tmp/mrwellan/jazzmind/src/example_run/tests/sqlitespeed) ;; (test-name sqlitespeed) (runscript runscript.rb) (db-host localhost) (run-id 1)) (let* ((testpath (assoc/default 'testpath cmdinfo)) ;; testpath is the test spec area (top-path (assoc/default 'toppath cmdinfo)) (work-area (assoc/default 'work-area cmdinfo)) ;; work-area is the test run area (test-name (assoc/default 'test-name cmdinfo)) |
︙ | ︙ | |||
830 831 832 833 834 835 836 | (list ;; (list "MT_TEST_RUN_DIR" work-area) (list "MT_RUN_AREA_HOME" *toppath*) (list "MT_TEST_NAME" test-name) ;; (list "MT_ITEM_INFO" (conc itemdat)) (list "MT_RUNNAME" runname) ;; (list "MT_TARGET" mt_target) )) | | | 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 | (list ;; (list "MT_TEST_RUN_DIR" work-area) (list "MT_RUN_AREA_HOME" *toppath*) (list "MT_TEST_NAME" test-name) ;; (list "MT_ITEM_INFO" (conc itemdat)) (list "MT_RUNNAME" runname) ;; (list "MT_TARGET" mt_target) )) (let* ((tregistry (tests:get-all)) (item-path (let ((ip (item-list->path itemdat))) (alist->env-vars (list (list "MT_ITEMPATH" ip))) ip)) (tconfig (or (tests:get-testconfig test-name tregistry #t) test-conf)) ;; force re-read now that all vars are set (useshell (let ((ush (config-lookup *configdat* "jobtools" "useshell"))) (if ush |
︙ | ︙ |
Modified tests.scm from [c32dd3737b] to [2e87ac7108].
︙ | ︙ | |||
748 749 750 751 752 753 754 | #f) (configf:read-alist cache-file))) (read-config test-configf #f system-allowed environ-patt: (if system-allowed "pre-launch-env-vars" #f))) #f))) (hash-table-set! *testconfigs* test-name tcfg) | > | | 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 | #f) (configf:read-alist cache-file))) (read-config test-configf #f system-allowed environ-patt: (if system-allowed "pre-launch-env-vars" #f))) #f))) (hash-table-set! *testconfigs* test-name tcfg) (if (and testexists cache-path (not cache-exists) (file-write-access? cache-path)) (let ((tpath (conc cache-path "/.testconfig"))) (debug:print-info 1 "Caching testconfig for " test-name " in " tpath) (configf:write-alist tcfg tpath))) tcfg)) |
︙ | ︙ |